@@ -21,33 +21,29 @@ final class NamePrettifierTest extends TestCase
2121{
2222 public function testNameOfTestClassCanBePrettified (): void
2323 {
24- $ this ->assertEquals ('Foo ' , (new NamePrettifier )->prettifyTestClassName ('FooTest ' ));
25- $ this ->assertEquals ('Foo ' , (new NamePrettifier )->prettifyTestClassName ('TestFoo ' ));
26- $ this ->assertEquals ('Foo ' , (new NamePrettifier )->prettifyTestClassName ('TestsFoo ' ));
27- $ this ->assertEquals ('Foo ' , (new NamePrettifier )->prettifyTestClassName ('TestFooTest ' ));
28- $ this ->assertEquals ('Foo (Test\Foo) ' , (new NamePrettifier )->prettifyTestClassName ('Test\FooTest ' ));
29- $ this ->assertEquals ('Foo (Tests\Foo) ' , (new NamePrettifier )->prettifyTestClassName ('Tests\FooTest ' ));
30- $ this ->assertEquals ('Unnamed Tests ' , (new NamePrettifier )->prettifyTestClassName ('TestTest ' ));
31- $ this ->assertEquals ('Système Testé ' , (new NamePrettifier )->prettifyTestClassName ('SystèmeTestéTest ' ));
32- $ this ->assertEquals ('Expression Évaluée ' , (new NamePrettifier )->prettifyTestClassName ('ExpressionÉvaluéeTest ' ));
24+ $ this ->assertSame ('Foo ' , (new NamePrettifier )->prettifyTestClassName ('FooTest ' ));
25+ $ this ->assertSame ('Foo ' , (new NamePrettifier )->prettifyTestClassName ('TestFoo ' ));
26+ $ this ->assertSame ('Foo ' , (new NamePrettifier )->prettifyTestClassName ('TestsFoo ' ));
27+ $ this ->assertSame ('Foo ' , (new NamePrettifier )->prettifyTestClassName ('TestFooTest ' ));
28+ $ this ->assertSame ('Foo (Test\Foo) ' , (new NamePrettifier )->prettifyTestClassName ('Test\FooTest ' ));
29+ $ this ->assertSame ('Foo (Tests\Foo) ' , (new NamePrettifier )->prettifyTestClassName ('Tests\FooTest ' ));
30+ $ this ->assertSame ('Unnamed Tests ' , (new NamePrettifier )->prettifyTestClassName ('TestTest ' ));
31+ $ this ->assertSame ('Système Testé ' , (new NamePrettifier )->prettifyTestClassName ('SystèmeTestéTest ' ));
32+ $ this ->assertSame ('Expression Évaluée ' , (new NamePrettifier )->prettifyTestClassName ('ExpressionÉvaluéeTest ' ));
3333 }
3434
3535 public function testNameOfTestMethodCanBePrettified (): void
3636 {
37- $ this ->assertEquals ('' , (new NamePrettifier )->prettifyTestMethodName ('' ));
38- $ this ->assertEquals ('This is a test ' , (new NamePrettifier )->prettifyTestMethodName ('testThisIsATest ' ));
39- $ this ->assertEquals ('This is a test ' , (new NamePrettifier )->prettifyTestMethodName ('testThisIsATest2 ' ));
40- $ this ->assertEquals ('This is a test ' , (new NamePrettifier )->prettifyTestMethodName ('this_is_a_test ' ));
41- $ this ->assertEquals ('This is a test ' , (new NamePrettifier )->prettifyTestMethodName ('test_this_is_a_test ' ));
42- $ this ->assertEquals ('Foo for bar is 0 ' , (new NamePrettifier )->prettifyTestMethodName ('testFooForBarIs0 ' ));
43- $ this ->assertEquals ('Foo for baz is 1 ' , (new NamePrettifier )->prettifyTestMethodName ('testFooForBazIs1 ' ));
44- $ this ->assertEquals ('This has a 123 in its name ' , (new NamePrettifier )->prettifyTestMethodName ('testThisHasA123InItsName ' ));
45- $ this ->assertEquals ('' , (new NamePrettifier )->prettifyTestMethodName ('test ' ));
46- }
47-
48- public function testTestNameIsNotGroupedWhenNotInSequence (): void
49- {
50- $ this ->assertEquals ('Sets redirect header on 301 ' , (new NamePrettifier )->prettifyTestMethodName ('testSetsRedirectHeaderOn301 ' ));
51- $ this ->assertEquals ('Sets redirect header on 302 ' , (new NamePrettifier )->prettifyTestMethodName ('testSetsRedirectHeaderOn302 ' ));
37+ $ this ->assertSame ('' , (new NamePrettifier )->prettifyTestMethodName ('' ));
38+ $ this ->assertSame ('' , (new NamePrettifier )->prettifyTestMethodName ('test ' ));
39+ $ this ->assertSame ('This is a test ' , (new NamePrettifier )->prettifyTestMethodName ('testThisIsATest ' ));
40+ $ this ->assertSame ('This is a test ' , (new NamePrettifier )->prettifyTestMethodName ('testThisIsATest2 ' ));
41+ $ this ->assertSame ('This is a test ' , (new NamePrettifier )->prettifyTestMethodName ('this_is_a_test ' ));
42+ $ this ->assertSame ('This is a test ' , (new NamePrettifier )->prettifyTestMethodName ('test_this_is_a_test ' ));
43+ $ this ->assertSame ('Foo for bar is 0 ' , (new NamePrettifier )->prettifyTestMethodName ('testFooForBarIs0 ' ));
44+ $ this ->assertSame ('Foo for baz is 1 ' , (new NamePrettifier )->prettifyTestMethodName ('testFooForBazIs1 ' ));
45+ $ this ->assertSame ('This has a 123 in its name ' , (new NamePrettifier )->prettifyTestMethodName ('testThisHasA123InItsName ' ));
46+ $ this ->assertSame ('Sets redirect header on 301 ' , (new NamePrettifier )->prettifyTestMethodName ('testSetsRedirectHeaderOn301 ' ));
47+ $ this ->assertSame ('Sets redirect header on 302 ' , (new NamePrettifier )->prettifyTestMethodName ('testSetsRedirectHeaderOn302 ' ));
5248 }
5349}
0 commit comments