public function testInterface()
{
$classMetadata = new ClassMetadataFactory(new LoaderChain(array()));
- $this->assertInstanceOf('Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactory', $classMetadata);
+ $this->assertInstanceOf('Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactoryInterface', $classMetadata);
}
public function testGetMetadataFor()
$this->assertFalse($factory->hasMetadataFor('Dunglas\Entity'));
}
+ /**
+ * @group legacy
+ */
public function testCacheExists()
{
$cache = $this->getMockBuilder('Doctrine\Common\Cache\Cache')->getMock();
$this->assertEquals('foo', $factory->getMetadataFor('Symfony\Component\Serializer\Tests\Fixtures\GroupDummy'));
}
+ /**
+ * @group legacy
+ */
public function testCacheNotExists()
{
$cache = $this->getMockBuilder('Doctrine\Common\Cache\Cache')->getMock();
- $cache
- ->method('fetch')
- ->will($this->returnValue(false))
- ;
-
- $cache
- ->method('save')
- ;
+ $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');