|
@@ 92-99 (lines=8) @@
|
| 89 |
|
|
| 90 |
|
$rsm->addRootEntityFromClassMetadata(Country::class, 'c'); |
| 91 |
|
|
| 92 |
|
for ($i = 0; $i < 4; $i++) { |
| 93 |
|
$name = "Country $i"; |
| 94 |
|
$entity = new Country($name); |
| 95 |
|
$result[] = $entity; |
| 96 |
|
|
| 97 |
|
$metadata->setFieldValue($entity, 'id', $i); |
| 98 |
|
$this->em->getUnitOfWork()->registerManaged($entity, ['id' => $i], ['name' => $name]); |
| 99 |
|
} |
| 100 |
|
|
| 101 |
|
$this->assertTrue($this->queryCache->put($key, $rsm, $result)); |
| 102 |
|
$this->assertArrayHasKey('put', $this->region->calls); |
|
@@ 366-373 (lines=8) @@
|
| 363 |
|
|
| 364 |
|
$rsm->addRootEntityFromClassMetadata(Country::class, 'c'); |
| 365 |
|
|
| 366 |
|
for ($i = 0; $i < 4; $i++) { |
| 367 |
|
$name = "Country $i"; |
| 368 |
|
$entity = new Country($name); |
| 369 |
|
$result[] = $entity; |
| 370 |
|
|
| 371 |
|
$metadata->setFieldValue($entity, 'id', $i); |
| 372 |
|
$this->em->getUnitOfWork()->registerManaged($entity, ['id' => $i], ['name' => $name]); |
| 373 |
|
} |
| 374 |
|
|
| 375 |
|
$this->region->addReturn('put', false); |
| 376 |
|
|
|
@@ 475-482 (lines=8) @@
|
| 472 |
|
|
| 473 |
|
$rsm->addRootEntityFromClassMetadata(Country::class, 'c'); |
| 474 |
|
|
| 475 |
|
for ($i = 0; $i < 4; $i++) { |
| 476 |
|
$name = "Country $i"; |
| 477 |
|
$entity = new Country($name); |
| 478 |
|
$result[] = $entity; |
| 479 |
|
|
| 480 |
|
$metadata->setFieldValue($entity, 'id', $i); |
| 481 |
|
$this->em->getUnitOfWork()->registerManaged($entity, ['id' => $i], ['name' => $name]); |
| 482 |
|
} |
| 483 |
|
|
| 484 |
|
$this->assertFalse($this->queryCache->put($key, $rsm, $result)); |
| 485 |
|
} |