11<?php
22
33/*
4- * This file is part of https://github.com/josantonius/php-hook 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-hook 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 \Hook \Tests \Hook ;
1315
@@ -32,14 +34,14 @@ public function setUp(): void
3234 $ this ->hook = new Hook ('foo_hook ' );
3335 }
3436
35- public function testShouldFailIfNoActionsWereAdded (): void
37+ public function test_should_fail_if_no_actions_were_added (): void
3638 {
3739 $ this ->expectException (HookException::class);
3840
3941 $ this ->hook ->doActions ();
4042 }
4143
42- public function testShouldDoActionsWithoutArguments (): void
44+ public function test_should_do_actions_without_arguments (): void
4345 {
4446 $ fooHook = new Hook ('foo_hook ' );
4547 $ barHook = new Hook ('bar_hook ' );
@@ -64,7 +66,7 @@ public function testShouldDoActionsWithoutArguments(): void
6466 $ this ->assertEmpty ($ action3 ->getResult ()->arguments );
6567 }
6668
67- public function testShouldDoActionsWithArguments (): void
69+ public function test_should_do_actions_with_arguments (): void
6870 {
6971 $ fooHook = new Hook ('foo_hook ' );
7072 $ barHook = new Hook ('bar_hook ' );
@@ -89,7 +91,7 @@ public function testShouldDoActionsWithArguments(): void
8991 $ this ->assertEquals (['bar ' , 'foo ' ], $ action3 ->getResult ()->arguments );
9092 }
9193
92- public function testShouldKeepTheActionIfWasSetWithAddAction (): void
94+ public function test_should_keep_the_action_if_was_set_with_add_action (): void
9395 {
9496 $ hook = new Hook ('user_hook ' );
9597
@@ -102,7 +104,7 @@ public function testShouldKeepTheActionIfWasSetWithAddAction(): void
102104 $ this ->assertCount (1 , $ actions );
103105 }
104106
105- public function testShouldRemoveTheActionIfWasSetWithAddActionOnce (): void
107+ public function test_should_remove_the_action_if_was_set_with_add_action_once (): void
106108 {
107109 $ hook = new Hook ('login_hook ' );
108110
@@ -115,7 +117,7 @@ public function testShouldRemoveTheActionIfWasSetWithAddActionOnce(): void
115117 $ this ->assertCount (0 , $ actions );
116118 }
117119
118- public function testShouldReturnAnArrayWithTheActionsDone (): void
120+ public function test_should_return_an_array_with_the_actions_done (): void
119121 {
120122 $ hook = new Hook ('logout_hook ' );
121123
@@ -132,7 +134,7 @@ public function testShouldReturnAnArrayWithTheActionsDone(): void
132134 $ this ->assertSame ($ actions [2 ], $ action3 );
133135 }
134136
135- public function testShouldMarkTheHookAsDone (): void
137+ public function test_should_mark_the_hook_as_done (): void
136138 {
137139 $ hook = new Hook ('called_hook ' );
138140
@@ -145,7 +147,7 @@ public function testShouldMarkTheHookAsDone(): void
145147 $ this ->assertTrue ($ hooks ['called_hook ' ]['done ' ]);
146148 }
147149
148- public function testShouldFailIfTheActionsAreDoneOnceAndHaveAlreadyBeenDone (): void
150+ public function test_should_fail_if_the_actions_are_done_once_and_have_already_been_done (): void
149151 {
150152 $ this ->expectException (HookException::class);
151153
@@ -158,7 +160,7 @@ public function testShouldFailIfTheActionsAreDoneOnceAndHaveAlreadyBeenDone(): v
158160 $ hook ->doActions ();
159161 }
160162
161- public function testShouldDoActionsAccordingToTheirOrderOfEntryWhenHasSamePriority (): void
163+ public function test_should_do_actions_according_to_their_entry_order_with_same_priority (): void
162164 {
163165 $ this ->foo ->clearHistory ();
164166
@@ -174,7 +176,7 @@ public function testShouldDoActionsAccordingToTheirOrderOfEntryWhenHasSamePriori
174176 $ this ->assertEquals (['one ' , 'two ' , 'three ' , 'four ' ], $ this ->foo ->getHistory ());
175177 }
176178
177- public function testShouldDoActionsAccordingToTheirPriorityLevel (): void
179+ public function test_should_do_actions_according_to_their_priority_level (): void
178180 {
179181 $ this ->foo ->clearHistory ();
180182
0 commit comments