Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bug #27405 [Cache] TagAwareAdapter should not corrupt memcached conne…
…ction in ascii mode
- Loading branch information
Aleksey Prilipko
committed
Jun 5, 2018
1 parent
31c7db9
commit 67d4e6d
Showing
2 changed files
with
44 additions
and
4 deletions.
There are no files selected for viewing
25 changes: 25 additions & 0 deletions
25
src/Symfony/Component/Cache/Tests/Simple/MemcachedCacheTextModeTest.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of the Symfony package. | ||
* | ||
* (c) Fabien Potencier <fabien@symfony.com> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace Symfony\Component\Cache\Tests\Simple; | ||
|
||
use Symfony\Component\Cache\Adapter\AbstractAdapter; | ||
use Symfony\Component\Cache\Simple\MemcachedCache; | ||
|
||
class MemcachedCacheTextModeTest extends MemcachedCacheTest | ||
{ | ||
public function createSimpleCache($defaultLifetime = 0) | ||
{ | ||
$client = AbstractAdapter::createConnection('memcached://'.getenv('MEMCACHED_HOST'), array('binary_protocol' => false)); | ||
|
||
return new MemcachedCache($client, str_replace('\\', '.', __CLASS__), $defaultLifetime); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters