public function PhpFileCacheTest::testImplementsSetState in Plug 7
File
- lib/doctrine/cache/tests/Doctrine/Tests/Common/Cache/PhpFileCacheTest.php, line 46
Class
- PhpFileCacheTest
- @group DCOM-101
Namespace
Doctrine\Tests\Common\Cache
Code
public function testImplementsSetState() {
$cache = $this
->_getCacheDriver();
$cache
->save('test_set_state', new SetStateClass(array(
1,
2,
3,
)));
$this
->assertCount(0, SetStateClass::$values);
$value = $cache
->fetch('test_set_state');
$this
->assertInstanceOf('Doctrine\\Tests\\Common\\Cache\\SetStateClass', $value);
$this
->assertEquals(array(
1,
2,
3,
), $value
->getValue());
$this
->assertCount(1, SetStateClass::$values);
$this
->assertTrue($cache
->contains('test_set_state'));
}