You are here

public function ClassMetadataFactoryTest::testCacheExists in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/symfony/serializer/Tests/Mapping/Factory/ClassMetadataFactoryTest.php \Symfony\Component\Serializer\Tests\Mapping\Factory\ClassMetadataFactoryTest::testCacheExists()

File

vendor/symfony/serializer/Tests/Mapping/Factory/ClassMetadataFactoryTest.php, line 48

Class

ClassMetadataFactoryTest
@author Kévin Dunglas <dunglas@gmail.com>

Namespace

Symfony\Component\Serializer\Tests\Mapping\Factory

Code

public function testCacheExists() {
  $cache = $this
    ->getMock('Doctrine\\Common\\Cache\\Cache');
  $cache
    ->expects($this
    ->once())
    ->method('fetch')
    ->will($this
    ->returnValue('foo'));
  $factory = new ClassMetadataFactory(new AnnotationLoader(new AnnotationReader()), $cache);
  $this
    ->assertEquals('foo', $factory
    ->getMetadataFor('Symfony\\Component\\Serializer\\Tests\\Fixtures\\GroupDummy'));
}