You are here

public function ClassMetadataFactoryTest::testWillFallbackOnNotLoadedMetadata in Plug 7

File

lib/doctrine/common/tests/Doctrine/Tests/Common/Persistence/Mapping/ClassMetadataFactoryTest.php, line 108

Class

ClassMetadataFactoryTest

Namespace

Doctrine\Tests\Common\Persistence\Mapping

Code

public function testWillFallbackOnNotLoadedMetadata() {
  $classMetadata = $this
    ->getMock('Doctrine\\Common\\Persistence\\Mapping\\ClassMetadata');
  $this->cmf->fallbackCallback = function () use ($classMetadata) {
    return $classMetadata;
  };
  $this->cmf->metadata = null;
  $this
    ->assertSame($classMetadata, $this->cmf
    ->getMetadataFor('Foo'));
}