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