1
0
mirror of synced 2024-12-13 22:56:04 +03:00

Some more tests for the Setup helper

This commit is contained in:
Benjamin Eberlei 2011-06-18 08:47:10 +02:00
parent ede68ec87b
commit 989d375be5
2 changed files with 22 additions and 0 deletions

View File

@ -29,6 +29,7 @@ class AllTests
$suite->addTestSuite('Doctrine\Tests\ORM\Tools\EntityGeneratorTest');
$suite->addTestSuite('Doctrine\Tests\ORM\Tools\SchemaValidatorTest');
$suite->addTestSuite('Doctrine\Tests\ORM\Tools\Console\Command\ConvertDoctrine1SchemaCommandTest');
$suite->addTestSuite('Doctrine\Tests\ORM\Tools\SetupTest');
return $suite;
}

View File

@ -46,7 +46,28 @@ class SetupTest extends \Doctrine\Tests\OrmTestCase
public function testAnnotationConfiguration()
{
$config = Setup::createAnnotationMetadataConfiguration(array(), true);
$this->assertInstanceOf('Doctrine\ORM\Configuration', $config);
$this->assertEquals(sys_get_temp_dir(), $config->getProxyDir());
$this->assertEquals('DoctrineProxies', $config->getProxyNamespace());
$this->assertInstanceOf('Doctrine\ORM\Mapping\Driver\AnnotationDriver', $config->getMetadataDriverImpl());
}
public function testXMLConfiguration()
{
$config = Setup::createXMLMetadataConfiguration(array(), true);
$this->assertInstanceOf('Doctrine\ORM\Configuration', $config);
$this->assertInstanceOf('Doctrine\ORM\Mapping\Driver\XmlDriver', $config->getMetadataDriverImpl());
}
public function testYAMLConfiguration()
{
$config = Setup::createYAMLMetadataConfiguration(array(), true);
$this->assertInstanceOf('Doctrine\ORM\Configuration', $config);
$this->assertInstanceOf('Doctrine\ORM\Mapping\Driver\YamlDriver', $config->getMetadataDriverImpl());
}
public function tearDown()