public function LegacyApcCacheTest::testRead in Plug 7
File
- lib/Symfony/validator/Symfony/Component/Validator/Tests/Mapping/Cache/LegacyApcCacheTest.php, line 67
Class
- LegacyApcCacheTest
- @group legacy
Namespace
Symfony\Component\Validator\Tests\Mapping\Cache
Code
public function testRead() {
$meta = $this
->getMockBuilder('Symfony\\Component\\Validator\\Mapping\\ClassMetadata')
->disableOriginalConstructor()
->setMethods(array(
'getClassName',
))
->getMock();
$meta
->expects($this
->once())
->method('getClassName')
->will($this
->returnValue('bar'));
$cache = new ApcCache('foo');
$cache
->write($meta);
$this
->assertInstanceOf('Symfony\\Component\\Validator\\Mapping\\ClassMetadata', $cache
->read('bar'), '->read() returns metadata');
}