kekrozsak/vendor/doctrine/doctrine-bundle/Doctrine/Bundle/DoctrineBundle/Tests/Mapping/MetadataFactoryTest.php
Polonkai Gergely 082a0130c2 Initial commit with Symfony 2.1+Vendors
Signed-off-by: Gergely POLONKAI (W00d5t0ck) <polesz@w00d5t0ck.info>
2012-07-01 09:52:20 +02:00

42 lines
1.3 KiB
PHP

<?php
/*
* This file is part of the Doctrine Bundle
*
* (c) Doctrine Project, Benjamin Eberlei <kontakt@beberlei.de>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Doctrine\Bundle\DoctrineBundle\Tests;
use Doctrine\Bundle\DoctrineBundle\Tests\TestCase;
use Doctrine\Bundle\DoctrineBundle\Mapping\MetadataFactory;
use Doctrine\Bundle\DoctrineBundle\Mapping\ClassMetadataCollection;
use Doctrine\ORM\Mapping\ClassMetadataInfo;
class MetadataFactoryTest extends TestCase
{
protected function setUp()
{
parent::setUp();
if (!class_exists('Doctrine\\ORM\\Version')) {
$this->markTestSkipped('Doctrine ORM is not available.');
}
}
public function testFindNamespaceAndPathForMetadata()
{
$class = new ClassMetadataInfo(__CLASS__);
$collection = new ClassMetadataCollection(array($class));
$registry = $this->getMock('Doctrine\Common\Persistence\ManagerRegistry');
$factory = new MetadataFactory($registry);
$this->setExpectedException("RuntimeException", "Can't find base path for \"Doctrine\Bundle\DoctrineBundle\Tests\MetadataFactoryTest");
$factory->findNamespaceAndPathForMetadata($collection);
}
}