@@ -31,10 +31,6 @@ final class IpTraceableTest extends BaseTestCaseORM
31
31
{
32
32
private const TEST_IP = '34.234.1.10 ' ;
33
33
34
- private const ARTICLE = Article::class;
35
- private const COMMENT = Comment::class;
36
- private const TYPE = Type::class;
37
-
38
34
protected function setUp (): void
39
35
{
40
36
parent ::setUp ();
@@ -98,12 +94,12 @@ public function testIpTraceable(): void
98
94
$ this ->em ->flush ();
99
95
$ this ->em ->clear ();
100
96
101
- $ sport = $ this ->em ->getRepository (self :: ARTICLE )->findOneBy (['title ' => 'Sport ' ]);
97
+ $ sport = $ this ->em ->getRepository (Article::class )->findOneBy (['title ' => 'Sport ' ]);
102
98
static ::assertSame (self ::TEST_IP , $ sport ->getCreated ());
103
99
static ::assertSame (self ::TEST_IP , $ sport ->getUpdated ());
104
100
static ::assertNull ($ sport ->getPublished ());
105
101
106
- $ sportComment = $ this ->em ->getRepository (self :: COMMENT )->findOneBy (['message ' => 'hello ' ]);
102
+ $ sportComment = $ this ->em ->getRepository (Comment::class )->findOneBy (['message ' => 'hello ' ]);
107
103
static ::assertSame (self ::TEST_IP , $ sportComment ->getModified ());
108
104
static ::assertNull ($ sportComment ->getClosed ());
109
105
@@ -119,7 +115,7 @@ public function testIpTraceable(): void
119
115
$ this ->em ->flush ();
120
116
$ this ->em ->clear ();
121
117
122
- $ sportComment = $ this ->em ->getRepository (self :: COMMENT )->findOneBy (['message ' => 'hello ' ]);
118
+ $ sportComment = $ this ->em ->getRepository (Comment::class )->findOneBy (['message ' => 'hello ' ]);
123
119
static ::assertSame (self ::TEST_IP , $ sportComment ->getClosed ());
124
120
125
121
static ::assertSame (self ::TEST_IP , $ sport ->getPublished ());
@@ -136,7 +132,7 @@ public function testForcedValues(): void
136
132
$ this ->em ->flush ();
137
133
$ this ->em ->clear ();
138
134
139
- $ repo = $ this ->em ->getRepository (self :: ARTICLE );
135
+ $ repo = $ this ->em ->getRepository (Article::class );
140
136
$ sport = $ repo ->findOneBy (['title ' => 'sport forced ' ]);
141
137
static ::assertSame (self ::TEST_IP , $ sport ->getCreated ());
142
138
static ::assertSame (self ::TEST_IP , $ sport ->getUpdated ());
@@ -158,9 +154,9 @@ public function testForcedValues(): void
158
154
protected function getUsedEntityFixtures (): array
159
155
{
160
156
return [
161
- self :: ARTICLE ,
162
- self :: COMMENT ,
163
- self :: TYPE ,
157
+ Article::class ,
158
+ Comment::class ,
159
+ Type::class ,
164
160
];
165
161
}
166
162
}
0 commit comments