@@ -29,7 +29,7 @@ public static function setupBeforeClass()
29
29
if (!MemcachedAdapter::isSupported ()) {
30
30
self ::markTestSkipped ('Extension memcached >=2.2.0 required. ' );
31
31
}
32
- self ::$ client = AbstractAdapter::createConnection ('memcached:// ' .getenv ('MEMCACHED_HOST ' ));
32
+ self ::$ client = AbstractAdapter::createConnection ('memcached:// ' .getenv ('MEMCACHED_HOST ' ), array ( ' binary_protocol ' => false ) );
33
33
self ::$ client ->get ('foo ' );
34
34
$ code = self ::$ client ->getResultCode ();
35
35
@@ -40,7 +40,9 @@ public static function setupBeforeClass()
40
40
41
41
public function createCachePool ($ defaultLifetime = 0 )
42
42
{
43
- return new MemcachedAdapter (self ::$ client , str_replace ('\\' , '. ' , __CLASS__ ), $ defaultLifetime );
43
+ $ client = $ defaultLifetime ? AbstractAdapter::createConnection ('memcached:// ' .getenv ('MEMCACHED_HOST ' )) : self ::$ client ;
44
+
45
+ return new MemcachedAdapter ($ client , str_replace ('\\' , '. ' , __CLASS__ ), $ defaultLifetime );
44
46
}
45
47
46
48
public function testOptions ()
@@ -80,15 +82,6 @@ public function provideBadOptions()
80
82
);
81
83
}
82
84
83
- /**
84
- * @expectedException \Symfony\Component\Cache\Exception\CacheException
85
- * @expectedExceptionMessage MemcachedAdapter: "binary_protocol" option must be enabled.
86
- */
87
- public function testBinaryProtocol ()
88
- {
89
- new MemcachedAdapter (MemcachedAdapter::createConnection (array (), array ('binary_protocol ' => false )));
90
- }
91
-
92
85
public function testDefaultOptions ()
93
86
{
94
87
$ this ->assertTrue (MemcachedAdapter::isSupported ());
0 commit comments