Files
Phraseanet/tests/Alchemy/Tests/Phrasea/Cache/MemcachedCacheTest.php
2015-06-15 19:30:51 +02:00

53 lines
1.1 KiB
PHP

<?php
namespace Alchemy\Tests\Phrasea\Cache;
use Alchemy\Phrasea\Cache\MemcachedCache;
/**
* @group functional
* @group legacy
*/
class MemcachedCacheTest extends \PhraseanetTestCase
{
/**
* @var MemcacheCache
*/
protected $object;
public function setUp()
{
parent::setUp();
$this->object = new MemcachedCache();
if (!class_exists('Memcached')) {
$this->markTestSkipped('No memcached extension');
}
$memcached = new \Memcached();
if (!@$memcached->addServer('localhost', 11211)) {
$this->markTestSkipped('No memcached server');
}
$this->object->setMemcached($memcached);
}
public function testIsServer()
{
$this->assertTrue($this->object->isServer());
}
public function testGetStats()
{
$this->assertTrue(is_array($this->object->getStats()));
}
public function testDeleteMulti()
{
// Remove the following lines when you implement this test.
$this->markTestIncomplete(
'This test has not been implemented yet.'
);
}
}