Skip to content

Commit c48ac76

Browse files
committed
Stop modifying readonly properties
1 parent 52e411f commit c48ac76

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

tests/Doctrine/Tests/ORM/Cache/DefaultQueryCacheTest.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -504,14 +504,13 @@ public function testGetShouldIgnoreOldQueryCacheEntryResult(): void
504504
['identifier' => ['id' => 1]],
505505
['identifier' => ['id' => 2]],
506506
],
507+
microtime(true) - 100,
507508
);
508509
$entities = [
509510
['id' => 1, 'name' => 'Foo'],
510511
['id' => 2, 'name' => 'Bar'],
511512
];
512513

513-
$entry->time = microtime(true) - 100;
514-
515514
$this->region->addReturn('get', $entry);
516515

517516
$this->region->addReturn(

tests/Doctrine/Tests/ORM/Functional/SecondLevelCacheQueryCacheTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -830,7 +830,7 @@ public function testQueryCacheLifetime(): void
830830
->get($key);
831831

832832
self::assertInstanceOf(QueryCacheEntry::class, $entry);
833-
$entry->time /= 2;
833+
$entry = new QueryCacheEntry($entry->result, $entry->time / 2);
834834

835835
$this->cache->getQueryCache()
836836
->getRegion()

0 commit comments

Comments
 (0)