Some more tests for the Setup helper
This commit is contained in:
parent
ede68ec87b
commit
989d375be5
@ -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;
|
||||
}
|
||||
|
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user