@@ -179,7 +179,8 @@ public static function getStrategyTests(): array
179179 public function testCacheableVoters ()
180180 {
181181 $ token = $ this ->createMock (TokenInterface::class);
182- $ voter = $ this ->getMockBuilder (CacheableVoterInterface::class)->getMockForAbstractClass ();
182+ $ voter = $ this ->createMock (CacheableVoterInterface::class);
183+
183184 $ voter
184185 ->expects ($ this ->once ())
185186 ->method ('supportsAttribute ' )
@@ -203,7 +204,7 @@ public function testCacheableVoters()
203204 public function testCacheableVotersIgnoresNonStringAttributes ()
204205 {
205206 $ token = $ this ->createMock (TokenInterface::class);
206- $ voter = $ this ->getMockBuilder (CacheableVoterInterface::class)-> getMockForAbstractClass ( );
207+ $ voter = $ this ->createMock (CacheableVoterInterface::class);
207208 $ voter
208209 ->expects ($ this ->never ())
209210 ->method ('supportsAttribute ' );
@@ -225,7 +226,7 @@ public function testCacheableVotersIgnoresNonStringAttributes()
225226 public function testCacheableVotersWithMultipleAttributes ()
226227 {
227228 $ token = $ this ->createMock (TokenInterface::class);
228- $ voter = $ this ->getMockBuilder (CacheableVoterInterface::class)-> getMockForAbstractClass ( );
229+ $ voter = $ this ->createMock (CacheableVoterInterface::class);
229230 $ voter
230231 ->expects ($ this ->exactly (2 ))
231232 ->method ('supportsAttribute ' )
@@ -258,7 +259,7 @@ public function testCacheableVotersWithMultipleAttributes()
258259 public function testCacheableVotersWithEmptyAttributes ()
259260 {
260261 $ token = $ this ->createMock (TokenInterface::class);
261- $ voter = $ this ->getMockBuilder (CacheableVoterInterface::class)-> getMockForAbstractClass ( );
262+ $ voter = $ this ->createMock (CacheableVoterInterface::class);
262263 $ voter
263264 ->expects ($ this ->never ())
264265 ->method ('supportsAttribute ' );
@@ -280,7 +281,7 @@ public function testCacheableVotersWithEmptyAttributes()
280281 public function testCacheableVotersSupportsMethodsCalledOnce ()
281282 {
282283 $ token = $ this ->createMock (TokenInterface::class);
283- $ voter = $ this ->getMockBuilder (CacheableVoterInterface::class)-> getMockForAbstractClass ( );
284+ $ voter = $ this ->createMock (CacheableVoterInterface::class);
284285 $ voter
285286 ->expects ($ this ->once ())
286287 ->method ('supportsAttribute ' )
@@ -305,7 +306,7 @@ public function testCacheableVotersSupportsMethodsCalledOnce()
305306 public function testCacheableVotersNotCalled ()
306307 {
307308 $ token = $ this ->createMock (TokenInterface::class);
308- $ voter = $ this ->getMockBuilder (CacheableVoterInterface::class)-> getMockForAbstractClass ( );
309+ $ voter = $ this ->createMock (CacheableVoterInterface::class);
309310 $ voter
310311 ->expects ($ this ->once ())
311312 ->method ('supportsAttribute ' )
@@ -325,7 +326,7 @@ public function testCacheableVotersNotCalled()
325326 public function testCacheableVotersWithMultipleAttributesAndNonString ()
326327 {
327328 $ token = $ this ->createMock (TokenInterface::class);
328- $ voter = $ this ->getMockBuilder (CacheableVoterInterface::class)-> getMockForAbstractClass ( );
329+ $ voter = $ this ->createMock (CacheableVoterInterface::class);
329330 $ voter
330331 ->expects ($ this ->once ())
331332 ->method ('supportsAttribute ' )
0 commit comments