class VoidCacheTest in Plug 7
@covers \Doctrine\Common\Cache\VoidCache
Hierarchy
- class \Doctrine\Tests\Common\Cache\VoidCacheTest extends \Doctrine\Tests\Common\Cache\PHPUnit_Framework_TestCase
Expanded class hierarchy of VoidCacheTest
File
- lib/
doctrine/ cache/ tests/ Doctrine/ Tests/ Common/ Cache/ VoidCacheTest.php, line 10
Namespace
Doctrine\Tests\Common\CacheView source
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() {
$cache = new VoidCache();
$this
->assertFalse($cache
->fetch('foo'));
$this
->assertFalse($cache
->fetch('bar'));
}
public function testShouldAlwaysReturnTrueOnSaveButNotStoreAnything() {
$cache = new VoidCache();
$this
->assertTrue($cache
->save('foo', 'fooVal'));
$this
->assertFalse($cache
->contains('foo'));
$this
->assertFalse($cache
->fetch('foo'));
}
public function testShouldAlwaysReturnTrueOnDelete() {
$cache = new VoidCache();
$this
->assertTrue($cache
->delete('foo'));
}
public function testShouldAlwaysReturnNullOnGetStatus() {
$cache = new VoidCache();
$this
->assertNull($cache
->getStats());
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
VoidCacheTest:: |
public | function | ||
VoidCacheTest:: |
public | function | ||
VoidCacheTest:: |
public | function | ||
VoidCacheTest:: |
public | function | ||
VoidCacheTest:: |
public | function |