File tree Expand file tree Collapse file tree 3 files changed +28
-5
lines changed
src/Symfony/Component/Cache Expand file tree Collapse file tree 3 files changed +28
-5
lines changed Original file line number Diff line number Diff line change 2626 "psr/link" : " ^1.0" ,
2727 "psr/log" : " ~1.0" ,
2828 "psr/simple-cache" : " ^1.0" ,
29+ "symfony/polyfill-apcu" : " ~1.1" ,
2930 "symfony/polyfill-intl-icu" : " ~1.0" ,
3031 "symfony/polyfill-mbstring" : " ~1.0" ,
3132 "symfony/polyfill-php56" : " ~1.0" ,
9697 "predis/predis" : " ~1.0" ,
9798 "egulias/email-validator" : " ~1.2,>=1.2.8|~2.0" ,
9899 "symfony/phpunit-bridge" : " ~3.2" ,
99- "symfony/polyfill-apcu" : " ~1.1" ,
100100 "symfony/security-acl" : " ~2.8|~3.0" ,
101101 "phpdocumentor/reflection-docblock" : " ^3.0|^4.0" ,
102102 "sensio/framework-extra-bundle" : " ^3.0.2"
Original file line number Diff line number Diff line change @@ -77,6 +77,31 @@ public function testVersion()
7777 $ this ->assertNull ($ item ->get ());
7878 }
7979
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+
80105 public function testWithCliSapi ()
81106 {
82107 try {
Original file line number Diff line number Diff line change 2323 "php" : " ^5.5.9|>=7.0.8" ,
2424 "psr/cache" : " ~1.0" ,
2525 "psr/log" : " ~1.0" ,
26- "psr/simple-cache" : " ^1.0"
26+ "psr/simple-cache" : " ^1.0" ,
27+ "symfony/polyfill-apcu" : " ~1.1"
2728 },
2829 "require-dev" : {
2930 "cache/integration-tests" : " dev-master" ,
3435 "conflict" : {
3536 "symfony/var-dumper" : " <3.3"
3637 },
37- "suggest" : {
38- "symfony/polyfill-apcu" : " For using ApcuAdapter on HHVM"
39- },
4038 "autoload" : {
4139 "psr-4" : { "Symfony\\ Component\\ Cache\\ " : " " },
4240 "exclude-from-classmap" : [
You can’t perform that action at this time.
0 commit comments