1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
|
From 446d41d69926a71816fb0ef27e0bc1570bcd7c49 Mon Sep 17 00:00:00 2001
From: Remi Collet <remi@remirepo.net>
Date: Fri, 10 Nov 2017 12:46:05 +0100
Subject: [PATCH 1/3] fix for 7.2, don't mock getResultSetMapping to properly
get an empty array instead if null
---
tests/Doctrine/Tests/ORM/Functional/QueryCacheTest.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/Doctrine/Tests/ORM/Functional/QueryCacheTest.php b/tests/Doctrine/Tests/ORM/Functional/QueryCacheTest.php
index 039bb16553..c86c7eccd6 100644
--- a/tests/Doctrine/Tests/ORM/Functional/QueryCacheTest.php
+++ b/tests/Doctrine/Tests/ORM/Functional/QueryCacheTest.php
@@ -128,7 +128,7 @@ public function testQueryCache_HitDoesNotSaveParserResult()
->method('execute')
->will($this->returnValue( 10 ));
- $parserResultMock = $this->getMock('Doctrine\ORM\Query\ParserResult');
+ $parserResultMock = $this->getMock('Doctrine\ORM\Query\ParserResult', ['getSqlExecutor']);
$parserResultMock->expects($this->once())
->method('getSqlExecutor')
->will($this->returnValue($sqlExecMock));
From 7df3876c76d916a8d76760d5006a814516ea3d83 Mon Sep 17 00:00:00 2001
From: Remi Collet <remi@remirepo.net>
Date: Fri, 10 Nov 2017 13:10:48 +0100
Subject: [PATCH 2/3] Fix ReflectionException: Given object is not an instance
of the class this property was declared in
---
.../Entity/NonStrictReadWriteCachedEntityPersisterTest.php | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/tests/Doctrine/Tests/ORM/Cache/Persister/Entity/NonStrictReadWriteCachedEntityPersisterTest.php b/tests/Doctrine/Tests/ORM/Cache/Persister/Entity/NonStrictReadWriteCachedEntityPersisterTest.php
index 6cf3fea3b0..538aed414a 100644
--- a/tests/Doctrine/Tests/ORM/Cache/Persister/Entity/NonStrictReadWriteCachedEntityPersisterTest.php
+++ b/tests/Doctrine/Tests/ORM/Cache/Persister/Entity/NonStrictReadWriteCachedEntityPersisterTest.php
@@ -28,7 +28,7 @@ public function testTransactionRollBackShouldClearQueue()
{
$entity = new Country("Foo");
$persister = $this->createPersisterDefault();
- $property = new \ReflectionProperty('Doctrine\ORM\Cache\Persister\Entity\ReadWriteCachedEntityPersister', 'queuedCache');
+ $property = new \ReflectionProperty($persister, 'queuedCache');
$property->setAccessible(true);
@@ -50,7 +50,7 @@ public function testInsertTransactionCommitShouldPutCache()
$persister = $this->createPersisterDefault();
$key = new EntityCacheKey(Country::CLASSNAME, array('id'=>1));
$entry = new EntityCacheEntry(Country::CLASSNAME, array('id'=>1, 'name'=>'Foo'));
- $property = new \ReflectionProperty('Doctrine\ORM\Cache\Persister\Entity\ReadWriteCachedEntityPersister', 'queuedCache');
+ $property = new \ReflectionProperty($persister, 'queuedCache');
$property->setAccessible(true);
@@ -87,7 +87,7 @@ public function testUpdateTransactionCommitShouldPutCache()
$persister = $this->createPersisterDefault();
$key = new EntityCacheKey(Country::CLASSNAME, array('id'=>1));
$entry = new EntityCacheEntry(Country::CLASSNAME, array('id'=>1, 'name'=>'Foo'));
- $property = new \ReflectionProperty('Doctrine\ORM\Cache\Persister\Entity\ReadWriteCachedEntityPersister', 'queuedCache');
+ $property = new \ReflectionProperty($persister, 'queuedCache');
$property->setAccessible(true);
@@ -115,7 +115,7 @@ public function testDeleteTransactionCommitShouldEvictCache()
$entity = new Country("Foo");
$persister = $this->createPersisterDefault();
$key = new EntityCacheKey(Country::CLASSNAME, array('id'=>1));
- $property = new \ReflectionProperty('Doctrine\ORM\Cache\Persister\Entity\ReadWriteCachedEntityPersister', 'queuedCache');
+ $property = new \ReflectionProperty($persister, 'queuedCache');
$property->setAccessible(true);
From 61f209d9a5384550f871c319d28636eed141c717 Mon Sep 17 00:00:00 2001
From: Remi Collet <remi@remirepo.net>
Date: Fri, 10 Nov 2017 13:24:33 +0100
Subject: [PATCH 3/3] fix skip condition for APC
---
tests/Doctrine/Tests/ORM/Cache/DefaultRegionTest.php | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tests/Doctrine/Tests/ORM/Cache/DefaultRegionTest.php b/tests/Doctrine/Tests/ORM/Cache/DefaultRegionTest.php
index 914bcf1917..b0ad000a70 100644
--- a/tests/Doctrine/Tests/ORM/Cache/DefaultRegionTest.php
+++ b/tests/Doctrine/Tests/ORM/Cache/DefaultRegionTest.php
@@ -27,7 +27,7 @@ public function testGetters()
public function testSharedRegion()
{
- if ( ! extension_loaded('apc') || false === @apc_cache_info()) {
+ if ( ! extension_loaded('apc') || ! is_array(@apc_cache_info("user"))) {
$this->markTestSkipped('The ' . __CLASS__ .' requires the use of APC');
}
@@ -97,4 +97,4 @@ public function testGetMulti()
$this->assertEquals($value1, $actual[0]);
$this->assertEquals($value2, $actual[1]);
}
-}
\ No newline at end of file
+}
|