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

Fix tests so that PostgreSQL does not fail anymore on certain test.

This commit is contained in:
Benjamin Eberlei 2010-12-21 22:33:23 +01:00
parent 988d229c07
commit 22ffbe7488
2 changed files with 16 additions and 3 deletions

View File

@ -8,9 +8,23 @@ require_once __DIR__ . '/../../../TestInit.php';
class DDC168Test extends \Doctrine\Tests\OrmFunctionalTestCase
{
protected $oldMetadata;
protected function setUp() {
$this->useModelSet('company');
parent::setUp();
$this->oldMetadata = $this->_em->getClassMetadata('Doctrine\Tests\Models\Company\CompanyEmployee');
$metadata = clone $this->oldMetadata;
ksort($metadata->reflFields);
$this->_em->getMetadataFactory()->setMetadataFor('Doctrine\Tests\Models\Company\CompanyEmployee', $metadata);
}
public function tearDown()
{
$this->_em->getMetadataFactory()->setMetadataFor('Doctrine\Tests\Models\Company\CompanyEmployee', $this->oldMetadata);
parent::tearDown();
}
/**
@ -19,9 +33,6 @@ class DDC168Test extends \Doctrine\Tests\OrmFunctionalTestCase
public function testJoinedSubclassPersisterRequiresSpecificOrderOfMetadataReflFieldsArray()
{
//$this->_em->getConnection()->getConfiguration()->setSQLLogger(new \Doctrine\DBAL\Logging\EchoSQLLogger);
$metadata = $this->_em->getClassMetadata('Doctrine\Tests\Models\Company\CompanyEmployee');
ksort($metadata->reflFields);
$spouse = new CompanyEmployee;
$spouse->setName("Blub");

View File

@ -21,6 +21,8 @@ class DDC933Test extends \Doctrine\Tests\OrmFunctionalTestCase
*/
public function testLockCTIClass()
{
//$this->_em->getConnection()->getConfiguration()->setSQLLogger(new \Doctrine\DBAL\Logging\EchoSQLLogger());
$manager = new \Doctrine\Tests\Models\Company\CompanyManager();
$manager->setName('beberlei');
$manager->setSalary(1234);