@@ 448-464 (lines=17) @@ | ||
445 | $this->assertCount(2, $this->region->calls['put']); |
|
446 | } |
|
447 | ||
448 | public function testIgnoreCacheNonGetMode() |
|
449 | { |
|
450 | $rsm = new ResultSetMappingBuilder($this->em); |
|
451 | $key = new QueryCacheKey('query.key1', 0, Cache::MODE_PUT); |
|
452 | $entry = new QueryCacheEntry( |
|
453 | [ |
|
454 | ['identifier' => ['id' => 1]], |
|
455 | ['identifier' => ['id' => 2]] |
|
456 | ] |
|
457 | ); |
|
458 | ||
459 | $rsm->addRootEntityFromClassMetadata(Country::class, 'c'); |
|
460 | ||
461 | $this->region->addReturn('get', $entry); |
|
462 | ||
463 | $this->assertNull($this->queryCache->get($key, $rsm)); |
|
464 | } |
|
465 | ||
466 | public function testIgnoreCacheNonPutMode() |
|
467 | { |
|
@@ 550-567 (lines=18) @@ | ||
547 | $this->assertNull($this->queryCache->get($key, $rsm)); |
|
548 | } |
|
549 | ||
550 | public function testGetShouldIgnoreMissingEntityQueryCacheEntry() |
|
551 | { |
|
552 | $rsm = new ResultSetMappingBuilder($this->em); |
|
553 | $key = new QueryCacheKey('query.key1', 0); |
|
554 | $entry = new QueryCacheEntry( |
|
555 | [ |
|
556 | ['identifier' => ['id' => 1]], |
|
557 | ['identifier' => ['id' => 2]] |
|
558 | ] |
|
559 | ); |
|
560 | ||
561 | $this->region->addReturn('get', $entry); |
|
562 | $this->region->addReturn('getMultiple', [null]); |
|
563 | ||
564 | $rsm->addRootEntityFromClassMetadata(Country::class, 'c'); |
|
565 | ||
566 | $this->assertNull($this->queryCache->get($key, $rsm)); |
|
567 | } |
|
568 | ||
569 | public function testGetAssociationValue() |
|
570 | { |