public function DoctrineCacheTest::testWrite in Plug 7
File
- lib/
Symfony/ validator/ Symfony/ Component/ Validator/ Tests/ Mapping/ Cache/ DoctrineCacheTest.php, line 21
Class
Namespace
Symfony\Component\Validator\Tests\Mapping\CacheCode
public function testWrite() {
$meta = $this
->getMockBuilder('Symfony\\Component\\Validator\\Mapping\\ClassMetadata')
->disableOriginalConstructor()
->setMethods(array(
'getClassName',
))
->getMock();
$meta
->expects($this
->once())
->method('getClassName')
->will($this
->returnValue('bar'));
$this->cache
->write($meta);
$this
->assertInstanceOf('Symfony\\Component\\Validator\\Mapping\\ClassMetadata', $this->cache
->read('bar'), 'write() stores metadata');
}