2626 */
2727final class BlameableTest extends BaseTestCaseORM
2828{
29- private const ARTICLE = Article::class;
30- private const COMMENT = Comment::class;
31- private const TYPE = Type::class;
32-
3329 protected function setUp (): void
3430 {
3531 parent ::setUp ();
@@ -62,12 +58,12 @@ public function testBlameable(): void
6258 $ this ->em ->flush ();
6359 $ this ->em ->clear ();
6460
65- $ sport = $ this ->em ->getRepository (self :: ARTICLE )->findOneBy (['title ' => 'Sport ' ]);
61+ $ sport = $ this ->em ->getRepository (Article::class )->findOneBy (['title ' => 'Sport ' ]);
6662 static ::assertSame ('testuser ' , $ sport ->getCreated ());
6763 static ::assertSame ('testuser ' , $ sport ->getUpdated ());
6864 static ::assertNull ($ sport ->getPublished ());
6965
70- $ sportComment = $ this ->em ->getRepository (self :: COMMENT )->findOneBy (['message ' => 'hello ' ]);
66+ $ sportComment = $ this ->em ->getRepository (Comment::class )->findOneBy (['message ' => 'hello ' ]);
7167 static ::assertSame ('testuser ' , $ sportComment ->getModified ());
7268 static ::assertNull ($ sportComment ->getClosed ());
7369
@@ -83,7 +79,7 @@ public function testBlameable(): void
8379 $ this ->em ->flush ();
8480 $ this ->em ->clear ();
8581
86- $ sportComment = $ this ->em ->getRepository (self :: COMMENT )->findOneBy (['message ' => 'hello ' ]);
82+ $ sportComment = $ this ->em ->getRepository (Comment::class )->findOneBy (['message ' => 'hello ' ]);
8783 static ::assertSame ('testuser ' , $ sportComment ->getClosed ());
8884
8985 static ::assertSame ('testuser ' , $ sport ->getPublished ());
@@ -100,7 +96,7 @@ public function testForcedValues(): void
10096 $ this ->em ->flush ();
10197 $ this ->em ->clear ();
10298
103- $ repo = $ this ->em ->getRepository (self :: ARTICLE );
99+ $ repo = $ this ->em ->getRepository (Article::class );
104100 $ sport = $ repo ->findOneBy (['title ' => 'sport forced ' ]);
105101 static ::assertSame ('myuser ' , $ sport ->getCreated ());
106102 static ::assertSame ('myuser ' , $ sport ->getUpdated ());
@@ -122,9 +118,9 @@ public function testForcedValues(): void
122118 protected function getUsedEntityFixtures (): array
123119 {
124120 return [
125- self :: ARTICLE ,
126- self :: COMMENT ,
127- self :: TYPE ,
121+ Article::class ,
122+ Comment::class ,
123+ Type::class ,
128124 ];
129125 }
130126}
0 commit comments