for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Doctrine\Tests\Common\Cache;
use Doctrine\Common\Cache\VoidCache;
/**
* @covers \Doctrine\Common\Cache\VoidCache
*/
class VoidCacheTest extends \PHPUnit_Framework_TestCase
{
public function testShouldAlwaysReturnFalseOnContains()
$cache = new VoidCache();
$this->assertFalse($cache->contains('foo'));
$this->assertFalse($cache->contains('bar'));
}
public function testShouldAlwaysReturnFalseOnFetch()
$this->assertFalse($cache->fetch('foo'));
$this->assertFalse($cache->fetch('bar'));
public function testShouldAlwaysReturnTrueOnSaveButNotStoreAnything()
$this->assertTrue($cache->save('foo', 'fooVal'));
public function testShouldAlwaysReturnTrueOnDelete()
$this->assertTrue($cache->delete('foo'));
public function testShouldAlwaysReturnNullOnGetStatus()
$this->assertNull($cache->getStats());
public function testShouldAlwaysReturnTrueOnFlush()
$this->assertTrue($cache->flushAll());