1
1
<?php
2
2
3
3
/*
4
- * This file is part of https://github.com/josantonius/php-exception-handler repository.
5
- *
6
- * (c) Josantonius <[email protected] >
7
- *
8
- * For the full copyright and license information, please view the LICENSE
9
- * file that was distributed with this source code.
10
- */
4
+ * This file is part of https://github.com/josantonius/php-exception-handler repository.
5
+ *
6
+ * (c) Josantonius <[email protected] >
7
+ *
8
+ * For the full copyright and license information, please view the LICENSE
9
+ * file that was distributed with this source code.
10
+ *
11
+ * @phpcs:disable PSR1.Methods.CamelCapsMethodName.NotCamelCaps
12
+ */
11
13
12
14
namespace Josantonius \ErrorHandler \Tests ;
13
15
@@ -31,14 +33,14 @@ public function setUp(): void
31
33
$ this ->handler = new Handler ();
32
34
}
33
35
34
- public function testShouldFailIfCallableCallbackIsNotPassed (): void
36
+ public function test_should_fail_if_callable_callback_is_not_passed (): void
35
37
{
36
38
$ this ->expectException (NotCallableException::class);
37
39
38
40
new ExceptionHandler (callback: 'foo ' );
39
41
}
40
42
41
- public function testShouldFailIfTheMethodNamesNotContainValidDataType (): void
43
+ public function test_should_fail_if_the_method_names_not_contain_valid_data_type (): void
42
44
{
43
45
$ this ->expectException (WrongMethodNameException::class);
44
46
@@ -48,15 +50,15 @@ public function testShouldFailIfTheMethodNamesNotContainValidDataType(): void
48
50
);
49
51
}
50
52
51
- public function testShouldSetTheHandlerOnlyWithTheCallback (): void
53
+ public function test_should_set_the_handler_only_with_the_callback (): void
52
54
{
53
55
$ this ->assertInstanceOf (
54
56
ExceptionHandler::class,
55
57
new ExceptionHandler (callback: $ this ->handler ->init (...))
56
58
);
57
59
}
58
60
59
- public function testShouldSetTheHandlerOnlyWithCallsToRunBefore (): void
61
+ public function test_should_set_the_handler_only_with_calls_to_run_before (): void
60
62
{
61
63
$ this ->assertInstanceOf (
62
64
ExceptionHandler::class,
@@ -67,7 +69,7 @@ public function testShouldSetTheHandlerOnlyWithCallsToRunBefore(): void
67
69
);
68
70
}
69
71
70
- public function testShouldSetTheHandlerOnlyWithCallsToAfter (): void
72
+ public function test_should_set_the_handler_only_with_calls_to_after (): void
71
73
{
72
74
$ this ->assertInstanceOf (
73
75
ExceptionHandler::class,
@@ -78,7 +80,7 @@ public function testShouldSetTheHandlerOnlyWithCallsToAfter(): void
78
80
);
79
81
}
80
82
81
- public function testShouldCallTheCallbackWhenAnExceptionIsThrow (): void
83
+ public function test_should_call_the_callback_when_an_exception_is_throw (): void
82
84
{
83
85
$ exceptionHandler = new ExceptionHandler (callback: $ this ->handler ->init (...));
84
86
@@ -94,7 +96,7 @@ public function testShouldCallTheCallbackWhenAnExceptionIsThrow(): void
94
96
$ this ->assertEquals ('init ' , History::get (0 )->methodName );
95
97
}
96
98
97
- public function testShouldCallTheCallbackBeforeRunMethodsWhenAnExceptionIsThrow (): void
99
+ public function test_should_call_the_callback_before_run_methods_when_exception_is_throw (): void
98
100
{
99
101
$ exceptionHandler = new ExceptionHandler (
100
102
callback: $ this ->handler ->init (...),
@@ -113,7 +115,7 @@ public function testShouldCallTheCallbackBeforeRunMethodsWhenAnExceptionIsThrow(
113
115
$ this ->assertEquals ('context ' , History::get (0 )->methodName );
114
116
}
115
117
116
- public function testShouldCallTheCallbackAfterRunMethodsWhenAnExceptionIsThrow (): void
118
+ public function test_should_call_the_callback_after_run_methods_when_exception_is_throw (): void
117
119
{
118
120
$ exceptionHandler = new ExceptionHandler (
119
121
callback: $ this ->handler ->init (...),
@@ -134,7 +136,7 @@ public function testShouldCallTheCallbackAfterRunMethodsWhenAnExceptionIsThrow()
134
136
$ this ->assertEquals ('render ' , History::get (2 )->methodName );
135
137
}
136
138
137
- public function testShouldCallTheCallbackAfterAndBeforeRunMethodsWhenAnExceptionIsThrow (): void
139
+ public function test_should_call_callback_and_all_methods_when_an_exception_is_throw (): void
138
140
{
139
141
$ exceptionHandler = new ExceptionHandler (
140
142
callback: $ this ->handler ->init (...),
0 commit comments