File tree 3 files changed +28
-5
lines changed
src/Symfony/Component/Cache
3 files changed +28
-5
lines changed Original file line number Diff line number Diff line change 26
26
"psr/link" : " ^1.0" ,
27
27
"psr/log" : " ~1.0" ,
28
28
"psr/simple-cache" : " ^1.0" ,
29
+ "symfony/polyfill-apcu" : " ~1.1" ,
29
30
"symfony/polyfill-intl-icu" : " ~1.0" ,
30
31
"symfony/polyfill-mbstring" : " ~1.0" ,
31
32
"symfony/polyfill-php56" : " ~1.0" ,
96
97
"predis/predis" : " ~1.0" ,
97
98
"egulias/email-validator" : " ~1.2,>=1.2.8|~2.0" ,
98
99
"symfony/phpunit-bridge" : " ~3.2" ,
99
- "symfony/polyfill-apcu" : " ~1.1" ,
100
100
"symfony/security-acl" : " ~2.8|~3.0" ,
101
101
"phpdocumentor/reflection-docblock" : " ^3.0|^4.0" ,
102
102
"sensio/framework-extra-bundle" : " ^3.0.2"
Original file line number Diff line number Diff line change @@ -77,6 +77,31 @@ public function testVersion()
77
77
$ this ->assertNull ($ item ->get ());
78
78
}
79
79
80
+ public function testNamespace ()
81
+ {
82
+ $ namespace = str_replace ('\\' , '. ' , get_class ($ this ));
83
+
84
+ $ pool1 = new ApcuAdapter ($ namespace .'_1 ' , 0 , 'p1 ' );
85
+
86
+ $ item = $ pool1 ->getItem ('foo ' );
87
+ $ this ->assertFalse ($ item ->isHit ());
88
+ $ this ->assertTrue ($ pool1 ->save ($ item ->set ('bar ' )));
89
+
90
+ $ item = $ pool1 ->getItem ('foo ' );
91
+ $ this ->assertTrue ($ item ->isHit ());
92
+ $ this ->assertSame ('bar ' , $ item ->get ());
93
+
94
+ $ pool2 = new ApcuAdapter ($ namespace .'_2 ' , 0 , 'p1 ' );
95
+
96
+ $ item = $ pool2 ->getItem ('foo ' );
97
+ $ this ->assertFalse ($ item ->isHit ());
98
+ $ this ->assertNull ($ item ->get ());
99
+
100
+ $ item = $ pool1 ->getItem ('foo ' );
101
+ $ this ->assertTrue ($ item ->isHit ());
102
+ $ this ->assertSame ('bar ' , $ item ->get ());
103
+ }
104
+
80
105
public function testWithCliSapi ()
81
106
{
82
107
try {
Original file line number Diff line number Diff line change 23
23
"php" : " ^5.5.9|>=7.0.8" ,
24
24
"psr/cache" : " ~1.0" ,
25
25
"psr/log" : " ~1.0" ,
26
- "psr/simple-cache" : " ^1.0"
26
+ "psr/simple-cache" : " ^1.0" ,
27
+ "symfony/polyfill-apcu" : " ~1.1"
27
28
},
28
29
"require-dev" : {
29
30
"cache/integration-tests" : " dev-master" ,
34
35
"conflict" : {
35
36
"symfony/var-dumper" : " <3.3"
36
37
},
37
- "suggest" : {
38
- "symfony/polyfill-apcu" : " For using ApcuAdapter on HHVM"
39
- },
40
38
"autoload" : {
41
39
"psr-4" : { "Symfony\\ Component\\ Cache\\ " : " " },
42
40
"exclude-from-classmap" : [
You can’t perform that action at this time.
0 commit comments