public function ClassMetadataFactoryTest::testCacheNotExists in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/serializer/Tests/Mapping/Factory/ClassMetadataFactoryTest.php \Symfony\Component\Serializer\Tests\Mapping\Factory\ClassMetadataFactoryTest::testCacheNotExists()
File
- vendor/
symfony/ serializer/ Tests/ Mapping/ Factory/ ClassMetadataFactoryTest.php, line 61
Class
- ClassMetadataFactoryTest
- @author Kévin Dunglas <dunglas@gmail.com>
Namespace
Symfony\Component\Serializer\Tests\Mapping\FactoryCode
public function testCacheNotExists() {
$cache = $this
->getMock('Doctrine\\Common\\Cache\\Cache');
$cache
->method('fetch')
->will($this
->returnValue(false));
$cache
->method('save');
$factory = new ClassMetadataFactory(new AnnotationLoader(new AnnotationReader()), $cache);
$metadata = $factory
->getMetadataFor('Symfony\\Component\\Serializer\\Tests\\Fixtures\\GroupDummy');
$this
->assertEquals(TestClassMetadataFactory::createClassMetadata(true, true), $metadata);
}