You are here

public function ClassMetadataFactoryTest::testCacheGetMetadataFor in Zircon Profile 8

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

File

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

Class

ClassMetadataFactoryTest

Namespace

Doctrine\Tests\Common\Persistence\Mapping

Code

public function testCacheGetMetadataFor() {
  $cache = new ArrayCache();
  $this->cmf
    ->setCacheDriver($cache);
  $loadedMetadata = $this->cmf
    ->getMetadataFor(__NAMESPACE__ . '\\ChildEntity');
  $this
    ->assertSame($loadedMetadata, $cache
    ->fetch(__NAMESPACE__ . '\\ChildEntity$CLASSMETADATA'));
}