public function lookupMetadataProviderFactoryForLogicTableMetadata(LogicTableMetadata $tableMetadata)
 {
     if (isset($this->metadataProviderFactories[$tableMetadata->getName()])) {
         return $this->metadataProviderFactories[$tableMetadata->getName()];
     } else {
         return null;
     }
 }
 public function testGetProviderForWithLogicTable()
 {
     $em = $this->getMock('Doctrine\\ORM\\EntityManager', array(), array(), '', false);
     $tableMetadata = new LogicTableMetadata('table_1');
     $logicTableMetadataProviderFactory = $this->getMock('Bluegrass\\Metadata\\Bundle\\MetadataBundle\\Model\\MetadataProvider\\Factory\\LogicTableMetadataProviderFactory', array(), array(), '', false);
     $logicTableMetadataProvider = $this->getMock('Bluegrass\\Metadata\\Bundle\\MetadataBundle\\Model\\MetadataProvider\\LogicTableMetadataProvider', array(), array(), '', false);
     $logicTableMetadataProviderFactory->expects($this->once())->method('create')->will($this->returnValue($logicTableMetadataProvider));
     $metadataProviderFactory = new MetadataProviderFactory($em);
     $metadataProviderFactory->setProvider($tableMetadata->getName(), $logicTableMetadataProviderFactory);
     $this->assertEquals($logicTableMetadataProvider, $metadataProviderFactory->getProviderFor($tableMetadata));
 }