public function CacheTest::testNamespace in Plug 7
File
- lib/
doctrine/ cache/ tests/ Doctrine/ Tests/ Common/ Cache/ CacheTest.php, line 210
Class
Namespace
Doctrine\Tests\Common\CacheCode
public function testNamespace() {
$cache = $this
->_getCacheDriver();
$cache
->setNamespace('ns1_');
$this
->assertTrue($cache
->save('key1', 1));
$this
->assertTrue($cache
->contains('key1'));
$cache
->setNamespace('ns2_');
$this
->assertFalse($cache
->contains('key1'));
}