File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
tests/Doctrine/Tests/ORM/Query Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -514,11 +514,13 @@ public function testGetParameterColonNormalize(): void
514
514
515
515
public function testGetQueryCacheDriverWithDefaults (): void
516
516
{
517
- $ cache = $ this ->createMock (CacheItemPoolInterface::class);
517
+ $ cache = $ this ->createMock (CacheItemPoolInterface::class);
518
+ $ cacheItemMock = $ this ->createMock (CacheItemInterface::class);
519
+ $ cacheItemMock ->method ('set ' )->willReturnSelf ();
518
520
$ cache
519
521
->expects (self ::atLeastOnce ())
520
522
->method ('getItem ' )
521
- ->willReturn ($ this -> createMock (CacheItemInterface::class) );
523
+ ->willReturn ($ cacheItemMock );
522
524
523
525
$ this ->entityManager ->getConfiguration ()->setQueryCache ($ cache );
524
526
$ this ->entityManager
@@ -528,11 +530,13 @@ public function testGetQueryCacheDriverWithDefaults(): void
528
530
529
531
public function testGetQueryCacheDriverWithCacheExplicitlySet (): void
530
532
{
531
- $ cache = $ this ->createMock (CacheItemPoolInterface::class);
533
+ $ cache = $ this ->createMock (CacheItemPoolInterface::class);
534
+ $ cacheItemMock = $ this ->createMock (CacheItemInterface::class);
535
+ $ cacheItemMock ->method ('set ' )->willReturnSelf ();
532
536
$ cache
533
537
->expects (self ::atLeastOnce ())
534
538
->method ('getItem ' )
535
- ->willReturn ($ this -> createMock (CacheItemInterface::class) );
539
+ ->willReturn ($ cacheItemMock );
536
540
537
541
$ this ->entityManager
538
542
->createQuery ('select u from ' . CmsUser::class . ' u ' )
You can’t perform that action at this time.
0 commit comments