Skip to content

Commit 2cdeaae

Browse files
Rename methods
1 parent aae2542 commit 2cdeaae

File tree

5 files changed

+78
-78
lines changed

5 files changed

+78
-78
lines changed

src/Event/Emitter/DispatchingEmitter.php

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ public function testPreparationFailed(Code\Test $test): void
338338
* @throws InvalidArgumentException
339339
* @throws UnknownEventTypeException
340340
*/
341-
public function testBeforeFirstTestMethodCalled(string $testClassName, ClassMethod $calledMethod): void
341+
public function beforeFirstTestMethodCalled(string $testClassName, ClassMethod $calledMethod): void
342342
{
343343
$this->dispatcher->dispatch(
344344
new Test\BeforeFirstTestMethodCalled(
@@ -355,7 +355,7 @@ public function testBeforeFirstTestMethodCalled(string $testClassName, ClassMeth
355355
* @throws InvalidArgumentException
356356
* @throws UnknownEventTypeException
357357
*/
358-
public function testBeforeFirstTestMethodErrored(string $testClassName, ClassMethod $calledMethod, Throwable $throwable): void
358+
public function beforeFirstTestMethodErrored(string $testClassName, ClassMethod $calledMethod, Throwable $throwable): void
359359
{
360360
$this->dispatcher->dispatch(
361361
new Test\BeforeFirstTestMethodErrored(
@@ -373,7 +373,7 @@ public function testBeforeFirstTestMethodErrored(string $testClassName, ClassMet
373373
* @throws InvalidArgumentException
374374
* @throws UnknownEventTypeException
375375
*/
376-
public function testBeforeFirstTestMethodFinished(string $testClassName, ClassMethod ...$calledMethods): void
376+
public function beforeFirstTestMethodFinished(string $testClassName, ClassMethod ...$calledMethods): void
377377
{
378378
$this->dispatcher->dispatch(
379379
new Test\BeforeFirstTestMethodFinished(
@@ -390,7 +390,7 @@ public function testBeforeFirstTestMethodFinished(string $testClassName, ClassMe
390390
* @throws InvalidArgumentException
391391
* @throws UnknownEventTypeException
392392
*/
393-
public function testBeforeTestMethodCalled(string $testClassName, ClassMethod $calledMethod): void
393+
public function beforeTestMethodCalled(string $testClassName, ClassMethod $calledMethod): void
394394
{
395395
$this->dispatcher->dispatch(
396396
new Test\BeforeTestMethodCalled(
@@ -407,7 +407,7 @@ public function testBeforeTestMethodCalled(string $testClassName, ClassMethod $c
407407
* @throws InvalidArgumentException
408408
* @throws UnknownEventTypeException
409409
*/
410-
public function testBeforeTestMethodErrored(string $testClassName, ClassMethod $calledMethod, Throwable $throwable): void
410+
public function beforeTestMethodErrored(string $testClassName, ClassMethod $calledMethod, Throwable $throwable): void
411411
{
412412
$this->dispatcher->dispatch(
413413
new Test\BeforeTestMethodErrored(
@@ -425,7 +425,7 @@ public function testBeforeTestMethodErrored(string $testClassName, ClassMethod $
425425
* @throws InvalidArgumentException
426426
* @throws UnknownEventTypeException
427427
*/
428-
public function testBeforeTestMethodFinished(string $testClassName, ClassMethod ...$calledMethods): void
428+
public function beforeTestMethodFinished(string $testClassName, ClassMethod ...$calledMethods): void
429429
{
430430
$this->dispatcher->dispatch(
431431
new Test\BeforeTestMethodFinished(
@@ -442,7 +442,7 @@ public function testBeforeTestMethodFinished(string $testClassName, ClassMethod
442442
* @throws InvalidArgumentException
443443
* @throws UnknownEventTypeException
444444
*/
445-
public function testPreConditionCalled(string $testClassName, ClassMethod $calledMethod): void
445+
public function preConditionCalled(string $testClassName, ClassMethod $calledMethod): void
446446
{
447447
$this->dispatcher->dispatch(
448448
new Test\PreConditionCalled(
@@ -459,7 +459,7 @@ public function testPreConditionCalled(string $testClassName, ClassMethod $calle
459459
* @throws InvalidArgumentException
460460
* @throws UnknownEventTypeException
461461
*/
462-
public function testPreConditionErrored(string $testClassName, ClassMethod $calledMethod, Throwable $throwable): void
462+
public function preConditionErrored(string $testClassName, ClassMethod $calledMethod, Throwable $throwable): void
463463
{
464464
$this->dispatcher->dispatch(
465465
new Test\PreConditionErrored(
@@ -477,7 +477,7 @@ public function testPreConditionErrored(string $testClassName, ClassMethod $call
477477
* @throws InvalidArgumentException
478478
* @throws UnknownEventTypeException
479479
*/
480-
public function testPreConditionFinished(string $testClassName, ClassMethod ...$calledMethods): void
480+
public function preConditionFinished(string $testClassName, ClassMethod ...$calledMethods): void
481481
{
482482
$this->dispatcher->dispatch(
483483
new Test\PreConditionFinished(
@@ -1048,7 +1048,7 @@ public function testFinished(Code\Test $test, int $numberOfAssertionsPerformed):
10481048
* @throws InvalidArgumentException
10491049
* @throws UnknownEventTypeException
10501050
*/
1051-
public function testPostConditionCalled(string $testClassName, ClassMethod $calledMethod): void
1051+
public function postConditionCalled(string $testClassName, ClassMethod $calledMethod): void
10521052
{
10531053
$this->dispatcher->dispatch(
10541054
new Test\PostConditionCalled(
@@ -1065,7 +1065,7 @@ public function testPostConditionCalled(string $testClassName, ClassMethod $call
10651065
* @throws InvalidArgumentException
10661066
* @throws UnknownEventTypeException
10671067
*/
1068-
public function testPostConditionErrored(string $testClassName, ClassMethod $calledMethod, Throwable $throwable): void
1068+
public function postConditionErrored(string $testClassName, ClassMethod $calledMethod, Throwable $throwable): void
10691069
{
10701070
$this->dispatcher->dispatch(
10711071
new Test\PostConditionErrored(
@@ -1083,7 +1083,7 @@ public function testPostConditionErrored(string $testClassName, ClassMethod $cal
10831083
* @throws InvalidArgumentException
10841084
* @throws UnknownEventTypeException
10851085
*/
1086-
public function testPostConditionFinished(string $testClassName, ClassMethod ...$calledMethods): void
1086+
public function postConditionFinished(string $testClassName, ClassMethod ...$calledMethods): void
10871087
{
10881088
$this->dispatcher->dispatch(
10891089
new Test\PostConditionFinished(
@@ -1100,7 +1100,7 @@ public function testPostConditionFinished(string $testClassName, ClassMethod ...
11001100
* @throws InvalidArgumentException
11011101
* @throws UnknownEventTypeException
11021102
*/
1103-
public function testAfterTestMethodCalled(string $testClassName, ClassMethod $calledMethod): void
1103+
public function afterTestMethodCalled(string $testClassName, ClassMethod $calledMethod): void
11041104
{
11051105
$this->dispatcher->dispatch(
11061106
new Test\AfterTestMethodCalled(
@@ -1117,7 +1117,7 @@ public function testAfterTestMethodCalled(string $testClassName, ClassMethod $ca
11171117
* @throws InvalidArgumentException
11181118
* @throws UnknownEventTypeException
11191119
*/
1120-
public function testAfterTestMethodErrored(string $testClassName, ClassMethod $calledMethod, Throwable $throwable): void
1120+
public function afterTestMethodErrored(string $testClassName, ClassMethod $calledMethod, Throwable $throwable): void
11211121
{
11221122
$this->dispatcher->dispatch(
11231123
new Test\AfterTestMethodErrored(
@@ -1135,7 +1135,7 @@ public function testAfterTestMethodErrored(string $testClassName, ClassMethod $c
11351135
* @throws InvalidArgumentException
11361136
* @throws UnknownEventTypeException
11371137
*/
1138-
public function testAfterTestMethodFinished(string $testClassName, ClassMethod ...$calledMethods): void
1138+
public function afterTestMethodFinished(string $testClassName, ClassMethod ...$calledMethods): void
11391139
{
11401140
$this->dispatcher->dispatch(
11411141
new Test\AfterTestMethodFinished(
@@ -1152,7 +1152,7 @@ public function testAfterTestMethodFinished(string $testClassName, ClassMethod .
11521152
* @throws InvalidArgumentException
11531153
* @throws UnknownEventTypeException
11541154
*/
1155-
public function testAfterLastTestMethodCalled(string $testClassName, ClassMethod $calledMethod): void
1155+
public function afterLastTestMethodCalled(string $testClassName, ClassMethod $calledMethod): void
11561156
{
11571157
$this->dispatcher->dispatch(
11581158
new Test\AfterLastTestMethodCalled(
@@ -1169,7 +1169,7 @@ public function testAfterLastTestMethodCalled(string $testClassName, ClassMethod
11691169
* @throws InvalidArgumentException
11701170
* @throws UnknownEventTypeException
11711171
*/
1172-
public function testAfterLastTestMethodErrored(string $testClassName, ClassMethod $calledMethod, Throwable $throwable): void
1172+
public function afterLastTestMethodErrored(string $testClassName, ClassMethod $calledMethod, Throwable $throwable): void
11731173
{
11741174
$this->dispatcher->dispatch(
11751175
new Test\AfterLastTestMethodErrored(
@@ -1187,7 +1187,7 @@ public function testAfterLastTestMethodErrored(string $testClassName, ClassMetho
11871187
* @throws InvalidArgumentException
11881188
* @throws UnknownEventTypeException
11891189
*/
1190-
public function testAfterLastTestMethodFinished(string $testClassName, ClassMethod ...$calledMethods): void
1190+
public function afterLastTestMethodFinished(string $testClassName, ClassMethod ...$calledMethods): void
11911191
{
11921192
$this->dispatcher->dispatch(
11931193
new Test\AfterLastTestMethodFinished(

src/Event/Emitter/Emitter.php

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -78,47 +78,47 @@ public function testPreparationFailed(Code\Test $test): void;
7878
/**
7979
* @psalm-param class-string $testClassName
8080
*/
81-
public function testBeforeFirstTestMethodCalled(string $testClassName, ClassMethod $calledMethod): void;
81+
public function beforeFirstTestMethodCalled(string $testClassName, ClassMethod $calledMethod): void;
8282

8383
/**
8484
* @psalm-param class-string $testClassName
8585
*/
86-
public function testBeforeFirstTestMethodErrored(string $testClassName, ClassMethod $calledMethod, Throwable $throwable): void;
86+
public function beforeFirstTestMethodErrored(string $testClassName, ClassMethod $calledMethod, Throwable $throwable): void;
8787

8888
/**
8989
* @psalm-param class-string $testClassName
9090
*/
91-
public function testBeforeFirstTestMethodFinished(string $testClassName, ClassMethod ...$calledMethods): void;
91+
public function beforeFirstTestMethodFinished(string $testClassName, ClassMethod ...$calledMethods): void;
9292

9393
/**
9494
* @psalm-param class-string $testClassName
9595
*/
96-
public function testBeforeTestMethodCalled(string $testClassName, ClassMethod $calledMethod): void;
96+
public function beforeTestMethodCalled(string $testClassName, ClassMethod $calledMethod): void;
9797

9898
/**
9999
* @psalm-param class-string $testClassName
100100
*/
101-
public function testBeforeTestMethodErrored(string $testClassName, ClassMethod $calledMethod, Throwable $throwable): void;
101+
public function beforeTestMethodErrored(string $testClassName, ClassMethod $calledMethod, Throwable $throwable): void;
102102

103103
/**
104104
* @psalm-param class-string $testClassName
105105
*/
106-
public function testBeforeTestMethodFinished(string $testClassName, ClassMethod ...$calledMethods): void;
106+
public function beforeTestMethodFinished(string $testClassName, ClassMethod ...$calledMethods): void;
107107

108108
/**
109109
* @psalm-param class-string $testClassName
110110
*/
111-
public function testPreConditionCalled(string $testClassName, ClassMethod $calledMethod): void;
111+
public function preConditionCalled(string $testClassName, ClassMethod $calledMethod): void;
112112

113113
/**
114114
* @psalm-param class-string $testClassName
115115
*/
116-
public function testPreConditionErrored(string $testClassName, ClassMethod $calledMethod, Throwable $throwable): void;
116+
public function preConditionErrored(string $testClassName, ClassMethod $calledMethod, Throwable $throwable): void;
117117

118118
/**
119119
* @psalm-param class-string $testClassName
120120
*/
121-
public function testPreConditionFinished(string $testClassName, ClassMethod ...$calledMethods): void;
121+
public function preConditionFinished(string $testClassName, ClassMethod ...$calledMethods): void;
122122

123123
public function testPrepared(Code\Test $test): void;
124124

@@ -275,47 +275,47 @@ public function testFinished(Code\Test $test, int $numberOfAssertionsPerformed):
275275
/**
276276
* @psalm-param class-string $testClassName
277277
*/
278-
public function testPostConditionCalled(string $testClassName, ClassMethod $calledMethod): void;
278+
public function postConditionCalled(string $testClassName, ClassMethod $calledMethod): void;
279279

280280
/**
281281
* @psalm-param class-string $testClassName
282282
*/
283-
public function testPostConditionErrored(string $testClassName, ClassMethod $calledMethod, Throwable $throwable): void;
283+
public function postConditionErrored(string $testClassName, ClassMethod $calledMethod, Throwable $throwable): void;
284284

285285
/**
286286
* @psalm-param class-string $testClassName
287287
*/
288-
public function testPostConditionFinished(string $testClassName, ClassMethod ...$calledMethods): void;
288+
public function postConditionFinished(string $testClassName, ClassMethod ...$calledMethods): void;
289289

290290
/**
291291
* @psalm-param class-string $testClassName
292292
*/
293-
public function testAfterTestMethodCalled(string $testClassName, ClassMethod $calledMethod): void;
293+
public function afterTestMethodCalled(string $testClassName, ClassMethod $calledMethod): void;
294294

295295
/**
296296
* @psalm-param class-string $testClassName
297297
*/
298-
public function testAfterTestMethodErrored(string $testClassName, ClassMethod $calledMethod, Throwable $throwable): void;
298+
public function afterTestMethodErrored(string $testClassName, ClassMethod $calledMethod, Throwable $throwable): void;
299299

300300
/**
301301
* @psalm-param class-string $testClassName
302302
*/
303-
public function testAfterTestMethodFinished(string $testClassName, ClassMethod ...$calledMethods): void;
303+
public function afterTestMethodFinished(string $testClassName, ClassMethod ...$calledMethods): void;
304304

305305
/**
306306
* @psalm-param class-string $testClassName
307307
*/
308-
public function testAfterLastTestMethodCalled(string $testClassName, ClassMethod $calledMethod): void;
308+
public function afterLastTestMethodCalled(string $testClassName, ClassMethod $calledMethod): void;
309309

310310
/**
311311
* @psalm-param class-string $testClassName
312312
*/
313-
public function testAfterLastTestMethodErrored(string $testClassName, ClassMethod $calledMethod, Throwable $throwable): void;
313+
public function afterLastTestMethodErrored(string $testClassName, ClassMethod $calledMethod, Throwable $throwable): void;
314314

315315
/**
316316
* @psalm-param class-string $testClassName
317317
*/
318-
public function testAfterLastTestMethodFinished(string $testClassName, ClassMethod ...$calledMethods): void;
318+
public function afterLastTestMethodFinished(string $testClassName, ClassMethod ...$calledMethods): void;
319319

320320
public function testSuiteFinished(TestSuite $testSuite): void;
321321

src/Framework/TestCase.php

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2077,9 +2077,9 @@ private function invokeBeforeClassHookMethods(array $hookMethods, Event\Emitter
20772077
$this->invokeHookMethods(
20782078
$hookMethods['beforeClass'],
20792079
$emitter,
2080-
'testBeforeFirstTestMethodCalled',
2081-
'testBeforeFirstTestMethodErrored',
2082-
'testBeforeFirstTestMethodFinished',
2080+
'beforeFirstTestMethodCalled',
2081+
'beforeFirstTestMethodErrored',
2082+
'beforeFirstTestMethodFinished',
20832083
);
20842084
}
20852085

@@ -2091,9 +2091,9 @@ private function invokeBeforeTestHookMethods(array $hookMethods, Event\Emitter $
20912091
$this->invokeHookMethods(
20922092
$hookMethods['before'],
20932093
$emitter,
2094-
'testBeforeTestMethodCalled',
2095-
'testBeforeTestMethodErrored',
2096-
'testBeforeTestMethodFinished',
2094+
'beforeTestMethodCalled',
2095+
'beforeTestMethodErrored',
2096+
'beforeTestMethodFinished',
20972097
);
20982098
}
20992099

@@ -2105,9 +2105,9 @@ private function invokePreConditionHookMethods(array $hookMethods, Event\Emitter
21052105
$this->invokeHookMethods(
21062106
$hookMethods['preCondition'],
21072107
$emitter,
2108-
'testPreConditionCalled',
2109-
'testPreConditionErrored',
2110-
'testPreConditionFinished',
2108+
'preConditionCalled',
2109+
'preConditionErrored',
2110+
'preConditionFinished',
21112111
);
21122112
}
21132113

@@ -2119,9 +2119,9 @@ private function invokePostConditionHookMethods(array $hookMethods, Event\Emitte
21192119
$this->invokeHookMethods(
21202120
$hookMethods['postCondition'],
21212121
$emitter,
2122-
'testPostConditionCalled',
2123-
'testPostConditionErrored',
2124-
'testPostConditionFinished',
2122+
'postConditionCalled',
2123+
'postConditionErrored',
2124+
'postConditionFinished',
21252125
);
21262126
}
21272127

@@ -2133,9 +2133,9 @@ private function invokeAfterTestHookMethods(array $hookMethods, Event\Emitter $e
21332133
$this->invokeHookMethods(
21342134
$hookMethods['after'],
21352135
$emitter,
2136-
'testAfterTestMethodCalled',
2137-
'testAfterTestMethodErrored',
2138-
'testAfterTestMethodFinished',
2136+
'afterTestMethodCalled',
2137+
'afterTestMethodErrored',
2138+
'afterTestMethodFinished',
21392139
);
21402140
}
21412141

@@ -2149,17 +2149,17 @@ private function invokeAfterClassHookMethods(array $hookMethods, Event\Emitter $
21492149
$this->invokeHookMethods(
21502150
$hookMethods['afterClass'],
21512151
$emitter,
2152-
'testAfterLastTestMethodCalled',
2153-
'testAfterLastTestMethodErrored',
2154-
'testAfterLastTestMethodFinished',
2152+
'afterLastTestMethodCalled',
2153+
'afterLastTestMethodErrored',
2154+
'afterLastTestMethodFinished',
21552155
);
21562156
}
21572157

21582158
/**
21592159
* @psalm-param list<non-empty-string> $hookMethods
2160-
* @psalm-param 'testBeforeFirstTestMethodCalled'|'testBeforeTestMethodCalled'|'testPreConditionCalled'|'testPostConditionCalled'|'testAfterTestMethodCalled'|'testAfterLastTestMethodCalled' $calledMethod
2161-
* @psalm-param 'testBeforeFirstTestMethodErrored'|'testBeforeTestMethodErrored'|'testPreConditionErrored'|'testPostConditionErrored'|'testAfterTestMethodErrored'|'testAfterLastTestMethodErrored' $erroredMethod
2162-
* @psalm-param 'testBeforeFirstTestMethodFinished'|'testBeforeTestMethodFinished'|'testPreConditionFinished'|'testPostConditionFinished'|'testAfterTestMethodFinished'|'testAfterLastTestMethodFinished' $finishedMethod
2160+
* @psalm-param 'beforeFirstTestMethodCalled'|'beforeTestMethodCalled'|'preConditionCalled'|'postConditionCalled'|'afterTestMethodCalled'|'afterLastTestMethodCalled' $calledMethod
2161+
* @psalm-param 'beforeFirstTestMethodErrored'|'beforeTestMethodErrored'|'preConditionErrored'|'postConditionErrored'|'afterTestMethodErrored'|'afterLastTestMethodErrored' $erroredMethod
2162+
* @psalm-param 'beforeFirstTestMethodFinished'|'beforeTestMethodFinished'|'preConditionFinished'|'postConditionFinished'|'afterTestMethodFinished'|'afterLastTestMethodFinished' $finishedMethod
21632163
*
21642164
* @throws Throwable
21652165
*/

0 commit comments

Comments
 (0)