@@ -179,7 +179,8 @@ public static function getStrategyTests(): array
179
179
public function testCacheableVoters ()
180
180
{
181
181
$ token = $ this ->createMock (TokenInterface::class);
182
- $ voter = $ this ->getMockBuilder (CacheableVoterInterface::class)->getMockForAbstractClass ();
182
+ $ voter = $ this ->createMock (CacheableVoterInterface::class);
183
+
183
184
$ voter
184
185
->expects ($ this ->once ())
185
186
->method ('supportsAttribute ' )
@@ -203,7 +204,7 @@ public function testCacheableVoters()
203
204
public function testCacheableVotersIgnoresNonStringAttributes ()
204
205
{
205
206
$ token = $ this ->createMock (TokenInterface::class);
206
- $ voter = $ this ->getMockBuilder (CacheableVoterInterface::class)-> getMockForAbstractClass ( );
207
+ $ voter = $ this ->createMock (CacheableVoterInterface::class);
207
208
$ voter
208
209
->expects ($ this ->never ())
209
210
->method ('supportsAttribute ' );
@@ -225,7 +226,7 @@ public function testCacheableVotersIgnoresNonStringAttributes()
225
226
public function testCacheableVotersWithMultipleAttributes ()
226
227
{
227
228
$ token = $ this ->createMock (TokenInterface::class);
228
- $ voter = $ this ->getMockBuilder (CacheableVoterInterface::class)-> getMockForAbstractClass ( );
229
+ $ voter = $ this ->createMock (CacheableVoterInterface::class);
229
230
$ voter
230
231
->expects ($ this ->exactly (2 ))
231
232
->method ('supportsAttribute ' )
@@ -258,7 +259,7 @@ public function testCacheableVotersWithMultipleAttributes()
258
259
public function testCacheableVotersWithEmptyAttributes ()
259
260
{
260
261
$ token = $ this ->createMock (TokenInterface::class);
261
- $ voter = $ this ->getMockBuilder (CacheableVoterInterface::class)-> getMockForAbstractClass ( );
262
+ $ voter = $ this ->createMock (CacheableVoterInterface::class);
262
263
$ voter
263
264
->expects ($ this ->never ())
264
265
->method ('supportsAttribute ' );
@@ -280,7 +281,7 @@ public function testCacheableVotersWithEmptyAttributes()
280
281
public function testCacheableVotersSupportsMethodsCalledOnce ()
281
282
{
282
283
$ token = $ this ->createMock (TokenInterface::class);
283
- $ voter = $ this ->getMockBuilder (CacheableVoterInterface::class)-> getMockForAbstractClass ( );
284
+ $ voter = $ this ->createMock (CacheableVoterInterface::class);
284
285
$ voter
285
286
->expects ($ this ->once ())
286
287
->method ('supportsAttribute ' )
@@ -305,7 +306,7 @@ public function testCacheableVotersSupportsMethodsCalledOnce()
305
306
public function testCacheableVotersNotCalled ()
306
307
{
307
308
$ token = $ this ->createMock (TokenInterface::class);
308
- $ voter = $ this ->getMockBuilder (CacheableVoterInterface::class)-> getMockForAbstractClass ( );
309
+ $ voter = $ this ->createMock (CacheableVoterInterface::class);
309
310
$ voter
310
311
->expects ($ this ->once ())
311
312
->method ('supportsAttribute ' )
@@ -325,7 +326,7 @@ public function testCacheableVotersNotCalled()
325
326
public function testCacheableVotersWithMultipleAttributesAndNonString ()
326
327
{
327
328
$ token = $ this ->createMock (TokenInterface::class);
328
- $ voter = $ this ->getMockBuilder (CacheableVoterInterface::class)-> getMockForAbstractClass ( );
329
+ $ voter = $ this ->createMock (CacheableVoterInterface::class);
329
330
$ voter
330
331
->expects ($ this ->once ())
331
332
->method ('supportsAttribute ' )
0 commit comments