You are here

public function ClassMetadataFactoryTest::testGetCachedMetadata in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/doctrine/common/tests/Doctrine/Tests/Common/Persistence/Mapping/ClassMetadataFactoryTest.php \Doctrine\Tests\Common\Persistence\Mapping\ClassMetadataFactoryTest::testGetCachedMetadata()

File

vendor/doctrine/common/tests/Doctrine/Tests/Common/Persistence/Mapping/ClassMetadataFactoryTest.php, line 57

Class

ClassMetadataFactoryTest

Namespace

Doctrine\Tests\Common\Persistence\Mapping

Code

public function testGetCachedMetadata() {
  $metadata = $this
    ->getMock('Doctrine\\Common\\Persistence\\Mapping\\ClassMetadata');
  $cache = new ArrayCache();
  $cache
    ->save(__NAMESPACE__ . '\\ChildEntity$CLASSMETADATA', $metadata);
  $this->cmf
    ->setCacheDriver($cache);
  $loadedMetadata = $this->cmf
    ->getMetadataFor(__NAMESPACE__ . '\\ChildEntity');
  $this
    ->assertSame($loadedMetadata, $metadata);
}