public function CacheTest::testDeleteAllNamespace in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/CacheTest.php \Doctrine\Tests\Common\Cache\CacheTest::testDeleteAllNamespace()
File
- vendor/
doctrine/ cache/ tests/ Doctrine/ Tests/ Common/ Cache/ CacheTest.php, line 226
Class
Namespace
Doctrine\Tests\Common\CacheCode
public function testDeleteAllNamespace() {
$cache = $this
->_getCacheDriver();
$cache
->setNamespace('ns1');
$this
->assertFalse($cache
->contains('key1'));
$cache
->save('key1', 'test');
$this
->assertTrue($cache
->contains('key1'));
$cache
->setNamespace('ns2');
$this
->assertFalse($cache
->contains('key1'));
$cache
->save('key1', 'test');
$this
->assertTrue($cache
->contains('key1'));
$cache
->setNamespace('ns1');
$this
->assertTrue($cache
->contains('key1'));
$cache
->deleteAll();
$this
->assertFalse($cache
->contains('key1'));
$cache
->setNamespace('ns2');
$this
->assertTrue($cache
->contains('key1'));
$cache
->deleteAll();
$this
->assertFalse($cache
->contains('key1'));
}