11<?php
22
33/*
4- * This file is part of https://github.com/josantonius/php-exception-handler repository.
5- *
6- * (c) Josantonius <hello@josantonius.dev>
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 <hello@josantonius.dev>
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+ */
1113
1214namespace Josantonius \ErrorHandler \Tests ;
1315
@@ -31,14 +33,14 @@ public function setUp(): void
3133 $ this ->handler = new Handler ();
3234 }
3335
34- public function testShouldFailIfCallableCallbackIsNotPassed (): void
36+ public function test_should_fail_if_callable_callback_is_not_passed (): void
3537 {
3638 $ this ->expectException (NotCallableException::class);
3739
3840 new ExceptionHandler (callback: 'foo ' );
3941 }
4042
41- public function testShouldFailIfTheMethodNamesNotContainValidDataType (): void
43+ public function test_should_fail_if_the_method_names_not_contain_valid_data_type (): void
4244 {
4345 $ this ->expectException (WrongMethodNameException::class);
4446
@@ -48,15 +50,15 @@ public function testShouldFailIfTheMethodNamesNotContainValidDataType(): void
4850 );
4951 }
5052
51- public function testShouldSetTheHandlerOnlyWithTheCallback (): void
53+ public function test_should_set_the_handler_only_with_the_callback (): void
5254 {
5355 $ this ->assertInstanceOf (
5456 ExceptionHandler::class,
5557 new ExceptionHandler (callback: $ this ->handler ->init (...))
5658 );
5759 }
5860
59- public function testShouldSetTheHandlerOnlyWithCallsToRunBefore (): void
61+ public function test_should_set_the_handler_only_with_calls_to_run_before (): void
6062 {
6163 $ this ->assertInstanceOf (
6264 ExceptionHandler::class,
@@ -67,7 +69,7 @@ public function testShouldSetTheHandlerOnlyWithCallsToRunBefore(): void
6769 );
6870 }
6971
70- public function testShouldSetTheHandlerOnlyWithCallsToAfter (): void
72+ public function test_should_set_the_handler_only_with_calls_to_after (): void
7173 {
7274 $ this ->assertInstanceOf (
7375 ExceptionHandler::class,
@@ -78,7 +80,7 @@ public function testShouldSetTheHandlerOnlyWithCallsToAfter(): void
7880 );
7981 }
8082
81- public function testShouldCallTheCallbackWhenAnExceptionIsThrow (): void
83+ public function test_should_call_the_callback_when_an_exception_is_throw (): void
8284 {
8385 $ exceptionHandler = new ExceptionHandler (callback: $ this ->handler ->init (...));
8486
@@ -94,7 +96,7 @@ public function testShouldCallTheCallbackWhenAnExceptionIsThrow(): void
9496 $ this ->assertEquals ('init ' , History::get (0 )->methodName );
9597 }
9698
97- public function testShouldCallTheCallbackBeforeRunMethodsWhenAnExceptionIsThrow (): void
99+ public function test_should_call_the_callback_before_run_methods_when_exception_is_throw (): void
98100 {
99101 $ exceptionHandler = new ExceptionHandler (
100102 callback: $ this ->handler ->init (...),
@@ -113,7 +115,7 @@ public function testShouldCallTheCallbackBeforeRunMethodsWhenAnExceptionIsThrow(
113115 $ this ->assertEquals ('context ' , History::get (0 )->methodName );
114116 }
115117
116- public function testShouldCallTheCallbackAfterRunMethodsWhenAnExceptionIsThrow (): void
118+ public function test_should_call_the_callback_after_run_methods_when_exception_is_throw (): void
117119 {
118120 $ exceptionHandler = new ExceptionHandler (
119121 callback: $ this ->handler ->init (...),
@@ -134,7 +136,7 @@ public function testShouldCallTheCallbackAfterRunMethodsWhenAnExceptionIsThrow()
134136 $ this ->assertEquals ('render ' , History::get (2 )->methodName );
135137 }
136138
137- public function testShouldCallTheCallbackAfterAndBeforeRunMethodsWhenAnExceptionIsThrow (): void
139+ public function test_should_call_callback_and_all_methods_when_an_exception_is_throw (): void
138140 {
139141 $ exceptionHandler = new ExceptionHandler (
140142 callback: $ this ->handler ->init (...),
0 commit comments