1
0
Fork 0
mirror of synced 2025-04-03 13:23:37 +03:00

Revert "#1178 - simplified ValueConversionType tests by using a single model-set for the entire subset of tests (faster as well)"

This reverts commit 2702540930.
This commit is contained in:
Marco Pivetta 2015-01-17 08:01:31 +01:00
parent 2702540930
commit 67f59dc256
15 changed files with 196 additions and 36 deletions

View file

@ -26,7 +26,7 @@ class InversedOneToOneCompositeIdEntity
public $someProperty; public $someProperty;
/** /**
* @OneToOne(targetEntity="OwningOneToOneCompositeIdEntity", mappedBy="associatedComposite") * @OneToOne(targetEntity="OwningOneToOneCompositeIdEntity", mappedBy="associatedEntity")
*/ */
public $associatedEntity; public $associatedEntity;
} }

View file

@ -21,5 +21,5 @@ class OwningOneToOneCompositeIdEntity
* @JoinColumn(name="associated_id2", referencedColumnName="id2") * @JoinColumn(name="associated_id2", referencedColumnName="id2")
* }) * })
*/ */
public $associatedComposite; public $associatedEntity;
} }

View file

@ -2,6 +2,7 @@
namespace Doctrine\Tests\ORM\Functional; namespace Doctrine\Tests\ORM\Functional;
use Doctrine\DBAL\Types\Type as DBALType;
use Doctrine\ORM\Tools\SchemaValidator; use Doctrine\ORM\Tools\SchemaValidator;
/** /**

View file

@ -2,6 +2,7 @@
namespace Doctrine\Tests\ORM\Functional\ValueConversionType; namespace Doctrine\Tests\ORM\Functional\ValueConversionType;
use Doctrine\DBAL\Types\Type as DBALType;
use Doctrine\Tests\Models\ValueConversionType as Entity; use Doctrine\Tests\Models\ValueConversionType as Entity;
use Doctrine\Tests\OrmFunctionalTestCase; use Doctrine\Tests\OrmFunctionalTestCase;
@ -18,7 +19,7 @@ class ManyToManyCompositeIdForeignKeyTest extends OrmFunctionalTestCase
{ {
public function setUp() public function setUp()
{ {
$this->useModelSet('vct'); $this->useModelSet('vct_manytomany_compositeid_foreignkey');
parent::setUp(); parent::setUp();
@ -43,6 +44,16 @@ class ManyToManyCompositeIdForeignKeyTest extends OrmFunctionalTestCase
$this->_em->clear(); $this->_em->clear();
} }
public static function tearDownAfterClass()
{
$conn = static::$_sharedConn;
$conn->executeUpdate('DROP TABLE vct_xref_manytomany_compositeid_foreignkey');
$conn->executeUpdate('DROP TABLE vct_owning_manytomany_compositeid_foreignkey');
$conn->executeUpdate('DROP TABLE vct_inversed_manytomany_compositeid_foreignkey');
$conn->executeUpdate('DROP TABLE vct_auxiliary');
}
public function testThatTheValueOfIdentifiersAreConvertedInTheDatabase() public function testThatTheValueOfIdentifiersAreConvertedInTheDatabase()
{ {
$conn = $this->_em->getConnection(); $conn = $this->_em->getConnection();

View file

@ -2,6 +2,7 @@
namespace Doctrine\Tests\ORM\Functional\ValueConversionType; namespace Doctrine\Tests\ORM\Functional\ValueConversionType;
use Doctrine\DBAL\Types\Type as DBALType;
use Doctrine\Tests\Models\ValueConversionType as Entity; use Doctrine\Tests\Models\ValueConversionType as Entity;
use Doctrine\Tests\OrmFunctionalTestCase; use Doctrine\Tests\OrmFunctionalTestCase;
@ -17,7 +18,7 @@ class ManyToManyCompositeIdTest extends OrmFunctionalTestCase
{ {
public function setUp() public function setUp()
{ {
$this->useModelSet('vct'); $this->useModelSet('vct_manytomany_compositeid');
parent::setUp(); parent::setUp();
@ -38,6 +39,15 @@ class ManyToManyCompositeIdTest extends OrmFunctionalTestCase
$this->_em->clear(); $this->_em->clear();
} }
public static function tearDownAfterClass()
{
$conn = static::$_sharedConn;
$conn->executeUpdate('DROP TABLE vct_xref_manytomany_compositeid');
$conn->executeUpdate('DROP TABLE vct_owning_manytomany_compositeid');
$conn->executeUpdate('DROP TABLE vct_inversed_manytomany_compositeid');
}
public function testThatTheValueOfIdentifiersAreConvertedInTheDatabase() public function testThatTheValueOfIdentifiersAreConvertedInTheDatabase()
{ {
$conn = $this->_em->getConnection(); $conn = $this->_em->getConnection();

View file

@ -2,6 +2,7 @@
namespace Doctrine\Tests\ORM\Functional\ValueConversionType; namespace Doctrine\Tests\ORM\Functional\ValueConversionType;
use Doctrine\DBAL\Types\Type as DBALType;
use Doctrine\Tests\Models\ValueConversionType as Entity; use Doctrine\Tests\Models\ValueConversionType as Entity;
use Doctrine\Tests\OrmFunctionalTestCase; use Doctrine\Tests\OrmFunctionalTestCase;
@ -18,7 +19,7 @@ class ManyToManyExtraLazyTest extends OrmFunctionalTestCase
{ {
public function setUp() public function setUp()
{ {
$this->useModelSet('vct'); $this->useModelSet('vct_manytomany_extralazy');
parent::setUp(); parent::setUp();
$inversed1 = new Entity\InversedManyToManyExtraLazyEntity(); $inversed1 = new Entity\InversedManyToManyExtraLazyEntity();
@ -52,6 +53,15 @@ class ManyToManyExtraLazyTest extends OrmFunctionalTestCase
$this->_em->clear(); $this->_em->clear();
} }
public static function tearDownAfterClass()
{
$conn = static::$_sharedConn;
$conn->executeUpdate('DROP TABLE vct_xref_manytomany_extralazy');
$conn->executeUpdate('DROP TABLE vct_owning_manytomany_extralazy');
$conn->executeUpdate('DROP TABLE vct_inversed_manytomany_extralazy');
}
public function testThatTheExtraLazyCollectionFromOwningToInversedIsCounted() public function testThatTheExtraLazyCollectionFromOwningToInversedIsCounted()
{ {
$owning = $this->_em->find( $owning = $this->_em->find(

View file

@ -2,6 +2,7 @@
namespace Doctrine\Tests\ORM\Functional\ValueConversionType; namespace Doctrine\Tests\ORM\Functional\ValueConversionType;
use Doctrine\DBAL\Types\Type as DBALType;
use Doctrine\Tests\Models\ValueConversionType as Entity; use Doctrine\Tests\Models\ValueConversionType as Entity;
use Doctrine\Tests\OrmFunctionalTestCase; use Doctrine\Tests\OrmFunctionalTestCase;
@ -17,7 +18,7 @@ class ManyToManyTest extends OrmFunctionalTestCase
{ {
public function setUp() public function setUp()
{ {
$this->useModelSet('vct'); $this->useModelSet('vct_manytomany');
parent::setUp(); parent::setUp();
@ -37,6 +38,15 @@ class ManyToManyTest extends OrmFunctionalTestCase
$this->_em->clear(); $this->_em->clear();
} }
public static function tearDownAfterClass()
{
$conn = static::$_sharedConn;
$conn->executeUpdate('DROP TABLE vct_xref_manytomany');
$conn->executeUpdate('DROP TABLE vct_owning_manytomany');
$conn->executeUpdate('DROP TABLE vct_inversed_manytomany');
}
public function testThatTheValueOfIdentifiersAreConvertedInTheDatabase() public function testThatTheValueOfIdentifiersAreConvertedInTheDatabase()
{ {
$conn = $this->_em->getConnection(); $conn = $this->_em->getConnection();

View file

@ -2,6 +2,7 @@
namespace Doctrine\Tests\ORM\Functional\ValueConversionType; namespace Doctrine\Tests\ORM\Functional\ValueConversionType;
use Doctrine\DBAL\Types\Type as DBALType;
use Doctrine\Tests\Models\ValueConversionType as Entity; use Doctrine\Tests\Models\ValueConversionType as Entity;
use Doctrine\Tests\OrmFunctionalTestCase; use Doctrine\Tests\OrmFunctionalTestCase;
@ -18,7 +19,7 @@ class OneToManyCompositeIdForeignKeyTest extends OrmFunctionalTestCase
{ {
public function setUp() public function setUp()
{ {
$this->useModelSet('vct'); $this->useModelSet('vct_onetomany_compositeid_foreignkey');
parent::setUp(); parent::setUp();
@ -44,6 +45,15 @@ class OneToManyCompositeIdForeignKeyTest extends OrmFunctionalTestCase
$this->_em->clear(); $this->_em->clear();
} }
public static function tearDownAfterClass()
{
$conn = static::$_sharedConn;
$conn->executeUpdate('DROP TABLE vct_owning_manytoone_compositeid_foreignkey');
$conn->executeUpdate('DROP TABLE vct_inversed_onetomany_compositeid_foreignkey');
$conn->executeUpdate('DROP TABLE vct_auxiliary');
}
public function testThatTheValueOfIdentifiersAreConvertedInTheDatabase() public function testThatTheValueOfIdentifiersAreConvertedInTheDatabase()
{ {
$conn = $this->_em->getConnection(); $conn = $this->_em->getConnection();

View file

@ -2,6 +2,7 @@
namespace Doctrine\Tests\ORM\Functional\ValueConversionType; namespace Doctrine\Tests\ORM\Functional\ValueConversionType;
use Doctrine\DBAL\Types\Type as DBALType;
use Doctrine\Tests\Models\ValueConversionType as Entity; use Doctrine\Tests\Models\ValueConversionType as Entity;
use Doctrine\Tests\OrmFunctionalTestCase; use Doctrine\Tests\OrmFunctionalTestCase;
@ -17,7 +18,7 @@ class OneToManyCompositeIdTest extends OrmFunctionalTestCase
{ {
public function setUp() public function setUp()
{ {
$this->useModelSet('vct'); $this->useModelSet('vct_onetomany_compositeid');
parent::setUp(); parent::setUp();
@ -39,6 +40,14 @@ class OneToManyCompositeIdTest extends OrmFunctionalTestCase
$this->_em->clear(); $this->_em->clear();
} }
public static function tearDownAfterClass()
{
$conn = static::$_sharedConn;
$conn->executeUpdate('DROP TABLE vct_owning_manytoone_compositeid');
$conn->executeUpdate('DROP TABLE vct_inversed_onetomany_compositeid');
}
public function testThatTheValueOfIdentifiersAreConvertedInTheDatabase() public function testThatTheValueOfIdentifiersAreConvertedInTheDatabase()
{ {
$conn = $this->_em->getConnection(); $conn = $this->_em->getConnection();

View file

@ -2,6 +2,7 @@
namespace Doctrine\Tests\ORM\Functional\ValueConversionType; namespace Doctrine\Tests\ORM\Functional\ValueConversionType;
use Doctrine\DBAL\Types\Type as DBALType;
use Doctrine\Tests\Models\ValueConversionType as Entity; use Doctrine\Tests\Models\ValueConversionType as Entity;
use Doctrine\Tests\OrmFunctionalTestCase; use Doctrine\Tests\OrmFunctionalTestCase;
@ -18,7 +19,7 @@ class OneToManyExtraLazyTest extends OrmFunctionalTestCase
{ {
public function setUp() public function setUp()
{ {
$this->useModelSet('vct'); $this->useModelSet('vct_onetomany_extralazy');
parent::setUp(); parent::setUp();
@ -50,6 +51,14 @@ class OneToManyExtraLazyTest extends OrmFunctionalTestCase
$this->_em->clear(); $this->_em->clear();
} }
public static function tearDownAfterClass()
{
$conn = static::$_sharedConn;
$conn->executeUpdate('DROP TABLE vct_owning_manytoone_extralazy');
$conn->executeUpdate('DROP TABLE vct_inversed_onetomany_extralazy');
}
public function testThatExtraLazyCollectionIsCounted() public function testThatExtraLazyCollectionIsCounted()
{ {
$inversed = $this->_em->find( $inversed = $this->_em->find(

View file

@ -2,6 +2,7 @@
namespace Doctrine\Tests\ORM\Functional\ValueConversionType; namespace Doctrine\Tests\ORM\Functional\ValueConversionType;
use Doctrine\DBAL\Types\Type as DBALType;
use Doctrine\Tests\Models\ValueConversionType as Entity; use Doctrine\Tests\Models\ValueConversionType as Entity;
use Doctrine\Tests\OrmFunctionalTestCase; use Doctrine\Tests\OrmFunctionalTestCase;
@ -17,7 +18,7 @@ class OneToManyTest extends OrmFunctionalTestCase
{ {
public function setUp() public function setUp()
{ {
$this->useModelSet('vct'); $this->useModelSet('vct_onetomany');
parent::setUp(); parent::setUp();
@ -38,6 +39,14 @@ class OneToManyTest extends OrmFunctionalTestCase
$this->_em->clear(); $this->_em->clear();
} }
public static function tearDownAfterClass()
{
$conn = static::$_sharedConn;
$conn->executeUpdate('DROP TABLE vct_owning_manytoone');
$conn->executeUpdate('DROP TABLE vct_inversed_onetomany');
}
public function testThatTheValueOfIdentifiersAreConvertedInTheDatabase() public function testThatTheValueOfIdentifiersAreConvertedInTheDatabase()
{ {
$conn = $this->_em->getConnection(); $conn = $this->_em->getConnection();

View file

@ -2,6 +2,7 @@
namespace Doctrine\Tests\ORM\Functional\ValueConversionType; namespace Doctrine\Tests\ORM\Functional\ValueConversionType;
use Doctrine\DBAL\Types\Type as DBALType;
use Doctrine\Tests\Models\ValueConversionType as Entity; use Doctrine\Tests\Models\ValueConversionType as Entity;
use Doctrine\Tests\OrmFunctionalTestCase; use Doctrine\Tests\OrmFunctionalTestCase;
@ -18,7 +19,7 @@ class OneToOneCompositeIdForeignKeyTest extends OrmFunctionalTestCase
{ {
public function setUp() public function setUp()
{ {
$this->useModelSet('vct'); $this->useModelSet('vct_onetoone_compositeid_foreignkey');
parent::setUp(); parent::setUp();
$auxiliary = new Entity\AuxiliaryEntity(); $auxiliary = new Entity\AuxiliaryEntity();
@ -43,6 +44,15 @@ class OneToOneCompositeIdForeignKeyTest extends OrmFunctionalTestCase
$this->_em->clear(); $this->_em->clear();
} }
public static function tearDownAfterClass()
{
$conn = static::$_sharedConn;
$conn->executeUpdate('DROP TABLE vct_owning_onetoone_compositeid_foreignkey');
$conn->executeUpdate('DROP TABLE vct_inversed_onetoone_compositeid_foreignkey');
$conn->executeUpdate('DROP TABLE vct_auxiliary');
}
public function testThatTheValueOfIdentifiersAreConvertedInTheDatabase() public function testThatTheValueOfIdentifiersAreConvertedInTheDatabase()
{ {
$conn = $this->_em->getConnection(); $conn = $this->_em->getConnection();

View file

@ -2,6 +2,7 @@
namespace Doctrine\Tests\ORM\Functional\ValueConversionType; namespace Doctrine\Tests\ORM\Functional\ValueConversionType;
use Doctrine\DBAL\Types\Type as DBALType;
use Doctrine\Tests\Models\ValueConversionType as Entity; use Doctrine\Tests\Models\ValueConversionType as Entity;
use Doctrine\Tests\OrmFunctionalTestCase; use Doctrine\Tests\OrmFunctionalTestCase;
@ -17,8 +18,7 @@ class OneToOneCompositeIdTest extends OrmFunctionalTestCase
{ {
public function setUp() public function setUp()
{ {
$this->useModelSet('vct'); $this->useModelSet('vct_onetoone_compositeid');
parent::setUp(); parent::setUp();
$inversed = new Entity\InversedOneToOneCompositeIdEntity(); $inversed = new Entity\InversedOneToOneCompositeIdEntity();
@ -30,7 +30,7 @@ class OneToOneCompositeIdTest extends OrmFunctionalTestCase
$owning->id3 = 'ghi'; $owning->id3 = 'ghi';
$inversed->associatedEntity = $owning; $inversed->associatedEntity = $owning;
$owning->associatedComposite = $inversed; $owning->associatedEntity = $inversed;
$this->_em->persist($inversed); $this->_em->persist($inversed);
$this->_em->persist($owning); $this->_em->persist($owning);
@ -39,6 +39,14 @@ class OneToOneCompositeIdTest extends OrmFunctionalTestCase
$this->_em->clear(); $this->_em->clear();
} }
public static function tearDownAfterClass()
{
$conn = static::$_sharedConn;
$conn->executeUpdate('DROP TABLE vct_owning_onetoone_compositeid');
$conn->executeUpdate('DROP TABLE vct_inversed_onetoone_compositeid');
}
public function testThatTheValueOfIdentifiersAreConvertedInTheDatabase() public function testThatTheValueOfIdentifiersAreConvertedInTheDatabase()
{ {
$conn = $this->_em->getConnection(); $conn = $this->_em->getConnection();
@ -100,7 +108,7 @@ class OneToOneCompositeIdTest extends OrmFunctionalTestCase
'ghi' 'ghi'
); );
$inversedProxy = $owning->associatedComposite; $inversedProxy = $owning->associatedEntity;
$this->assertEquals('some value to be loaded', $inversedProxy->someProperty); $this->assertEquals('some value to be loaded', $inversedProxy->someProperty);
} }
@ -115,9 +123,6 @@ class OneToOneCompositeIdTest extends OrmFunctionalTestCase
array('id1' => 'abc', 'id2' => 'def') array('id1' => 'abc', 'id2' => 'def')
); );
$this->assertInstanceOf( $this->assertInstanceOf('Doctrine\Tests\Models\ValueConversionType\OwningOneToOneCompositeIdEntity', $inversed->associatedEntity);
'Doctrine\Tests\Models\ValueConversionType\OwningOneToOneCompositeIdEntity',
$inversed->associatedEntity
);
} }
} }

View file

@ -2,6 +2,7 @@
namespace Doctrine\Tests\ORM\Functional\ValueConversionType; namespace Doctrine\Tests\ORM\Functional\ValueConversionType;
use Doctrine\DBAL\Types\Type as DBALType;
use Doctrine\Tests\Models\ValueConversionType as Entity; use Doctrine\Tests\Models\ValueConversionType as Entity;
use Doctrine\Tests\OrmFunctionalTestCase; use Doctrine\Tests\OrmFunctionalTestCase;
@ -17,7 +18,7 @@ class OneToOneTest extends OrmFunctionalTestCase
{ {
public function setUp() public function setUp()
{ {
$this->useModelSet('vct'); $this->useModelSet('vct_onetoone');
parent::setUp(); parent::setUp();
@ -38,6 +39,14 @@ class OneToOneTest extends OrmFunctionalTestCase
$this->_em->clear(); $this->_em->clear();
} }
public static function tearDownAfterClass()
{
$conn = static::$_sharedConn;
$conn->executeUpdate('DROP TABLE vct_owning_onetoone');
$conn->executeUpdate('DROP TABLE vct_inversed_onetoone');
}
public function testThatTheValueOfIdentifiersAreConvertedInTheDatabase() public function testThatTheValueOfIdentifiersAreConvertedInTheDatabase()
{ {
$conn = $this->_em->getConnection(); $conn = $this->_em->getConnection();

View file

@ -3,7 +3,6 @@
namespace Doctrine\Tests; namespace Doctrine\Tests;
use Doctrine\DBAL\Types\Type; use Doctrine\DBAL\Types\Type;
use Doctrine\ORM\Tools\SchemaTool;
use Doctrine\Tests\EventListener\CacheMetadataListener; use Doctrine\Tests\EventListener\CacheMetadataListener;
use Doctrine\ORM\Cache\Logging\StatisticsCacheLogger; use Doctrine\ORM\Cache\Logging\StatisticsCacheLogger;
use Doctrine\ORM\Cache\DefaultCacheFactory; use Doctrine\ORM\Cache\DefaultCacheFactory;
@ -42,7 +41,7 @@ abstract class OrmFunctionalTestCase extends OrmTestCase
protected $_em; protected $_em;
/** /**
* @var SchemaTool * @var \Doctrine\ORM\Tools\SchemaTool
*/ */
protected $_schemaTool; protected $_schemaTool;
@ -201,30 +200,52 @@ abstract class OrmFunctionalTestCase extends OrmTestCase
'Doctrine\Tests\Models\Quote\Phone', 'Doctrine\Tests\Models\Quote\Phone',
'Doctrine\Tests\Models\Quote\User' 'Doctrine\Tests\Models\Quote\User'
), ),
'vct' => array( 'vct_onetoone' => array(
'Doctrine\Tests\Models\ValueConversionType\InversedOneToOneEntity', 'Doctrine\Tests\Models\ValueConversionType\InversedOneToOneEntity',
'Doctrine\Tests\Models\ValueConversionType\OwningOneToOneEntity', 'Doctrine\Tests\Models\ValueConversionType\OwningOneToOneEntity'
),
'vct_onetoone_compositeid' => array(
'Doctrine\Tests\Models\ValueConversionType\InversedOneToOneCompositeIdEntity', 'Doctrine\Tests\Models\ValueConversionType\InversedOneToOneCompositeIdEntity',
'Doctrine\Tests\Models\ValueConversionType\OwningOneToOneCompositeIdEntity', 'Doctrine\Tests\Models\ValueConversionType\OwningOneToOneCompositeIdEntity'
),
'vct_onetoone_compositeid_foreignkey' => array(
'Doctrine\Tests\Models\ValueConversionType\AuxiliaryEntity', 'Doctrine\Tests\Models\ValueConversionType\AuxiliaryEntity',
'Doctrine\Tests\Models\ValueConversionType\InversedOneToOneCompositeIdForeignKeyEntity', 'Doctrine\Tests\Models\ValueConversionType\InversedOneToOneCompositeIdForeignKeyEntity',
'Doctrine\Tests\Models\ValueConversionType\OwningOneToOneCompositeIdForeignKeyEntity', 'Doctrine\Tests\Models\ValueConversionType\OwningOneToOneCompositeIdForeignKeyEntity'
),
'vct_onetomany' => array(
'Doctrine\Tests\Models\ValueConversionType\InversedOneToManyEntity', 'Doctrine\Tests\Models\ValueConversionType\InversedOneToManyEntity',
'Doctrine\Tests\Models\ValueConversionType\OwningManyToOneEntity', 'Doctrine\Tests\Models\ValueConversionType\OwningManyToOneEntity'
),
'vct_onetomany_compositeid' => array(
'Doctrine\Tests\Models\ValueConversionType\InversedOneToManyCompositeIdEntity', 'Doctrine\Tests\Models\ValueConversionType\InversedOneToManyCompositeIdEntity',
'Doctrine\Tests\Models\ValueConversionType\OwningManyToOneCompositeIdEntity', 'Doctrine\Tests\Models\ValueConversionType\OwningManyToOneCompositeIdEntity'
),
'vct_onetomany_compositeid_foreignkey' => array(
'Doctrine\Tests\Models\ValueConversionType\AuxiliaryEntity',
'Doctrine\Tests\Models\ValueConversionType\InversedOneToManyCompositeIdForeignKeyEntity', 'Doctrine\Tests\Models\ValueConversionType\InversedOneToManyCompositeIdForeignKeyEntity',
'Doctrine\Tests\Models\ValueConversionType\OwningManyToOneCompositeIdForeignKeyEntity', 'Doctrine\Tests\Models\ValueConversionType\OwningManyToOneCompositeIdForeignKeyEntity'
),
'vct_onetomany_extralazy' => array(
'Doctrine\Tests\Models\ValueConversionType\InversedOneToManyExtraLazyEntity', 'Doctrine\Tests\Models\ValueConversionType\InversedOneToManyExtraLazyEntity',
'Doctrine\Tests\Models\ValueConversionType\OwningManyToOneExtraLazyEntity', 'Doctrine\Tests\Models\ValueConversionType\OwningManyToOneExtraLazyEntity'
),
'vct_manytomany' => array(
'Doctrine\Tests\Models\ValueConversionType\InversedManyToManyEntity', 'Doctrine\Tests\Models\ValueConversionType\InversedManyToManyEntity',
'Doctrine\Tests\Models\ValueConversionType\OwningManyToManyEntity', 'Doctrine\Tests\Models\ValueConversionType\OwningManyToManyEntity'
),
'vct_manytomany_compositeid' => array(
'Doctrine\Tests\Models\ValueConversionType\InversedManyToManyCompositeIdEntity', 'Doctrine\Tests\Models\ValueConversionType\InversedManyToManyCompositeIdEntity',
'Doctrine\Tests\Models\ValueConversionType\OwningManyToManyCompositeIdEntity', 'Doctrine\Tests\Models\ValueConversionType\OwningManyToManyCompositeIdEntity'
),
'vct_manytomany_compositeid_foreignkey' => array(
'Doctrine\Tests\Models\ValueConversionType\AuxiliaryEntity',
'Doctrine\Tests\Models\ValueConversionType\InversedManyToManyCompositeIdForeignKeyEntity', 'Doctrine\Tests\Models\ValueConversionType\InversedManyToManyCompositeIdForeignKeyEntity',
'Doctrine\Tests\Models\ValueConversionType\OwningManyToManyCompositeIdForeignKeyEntity', 'Doctrine\Tests\Models\ValueConversionType\OwningManyToManyCompositeIdForeignKeyEntity'
),
'vct_manytomany_extralazy' => array(
'Doctrine\Tests\Models\ValueConversionType\InversedManyToManyExtraLazyEntity', 'Doctrine\Tests\Models\ValueConversionType\InversedManyToManyExtraLazyEntity',
'Doctrine\Tests\Models\ValueConversionType\OwningManyToManyExtraLazyEntity', 'Doctrine\Tests\Models\ValueConversionType\OwningManyToManyExtraLazyEntity'
), ),
); );
@ -385,33 +406,63 @@ abstract class OrmFunctionalTestCase extends OrmTestCase
$conn->executeUpdate('DELETE FROM ' . $platform->quoteIdentifier("quote-user")); $conn->executeUpdate('DELETE FROM ' . $platform->quoteIdentifier("quote-user"));
} }
if (isset($this->_usedModelSets['vct'])) { if (isset($this->_usedModelSets['vct_onetoone'])) {
$conn->executeUpdate('DELETE FROM vct_owning_onetoone'); $conn->executeUpdate('DELETE FROM vct_owning_onetoone');
$conn->executeUpdate('DELETE FROM vct_inversed_onetoone'); $conn->executeUpdate('DELETE FROM vct_inversed_onetoone');
}
if (isset($this->_usedModelSets['vct_onetoone_compositeid'])) {
$conn->executeUpdate('DELETE FROM vct_owning_onetoone_compositeid'); $conn->executeUpdate('DELETE FROM vct_owning_onetoone_compositeid');
$conn->executeUpdate('DELETE FROM vct_inversed_onetoone_compositeid'); $conn->executeUpdate('DELETE FROM vct_inversed_onetoone_compositeid');
}
if (isset($this->_usedModelSets['vct_onetoone_compositeid_foreignkey'])) {
$conn->executeUpdate('DELETE FROM vct_owning_onetoone_compositeid_foreignkey'); $conn->executeUpdate('DELETE FROM vct_owning_onetoone_compositeid_foreignkey');
$conn->executeUpdate('DELETE FROM vct_inversed_onetoone_compositeid_foreignkey'); $conn->executeUpdate('DELETE FROM vct_inversed_onetoone_compositeid_foreignkey');
$conn->executeUpdate('DELETE FROM vct_auxiliary'); $conn->executeUpdate('DELETE FROM vct_auxiliary');
}
if (isset($this->_usedModelSets['vct_onetomany'])) {
$conn->executeUpdate('DELETE FROM vct_owning_manytoone'); $conn->executeUpdate('DELETE FROM vct_owning_manytoone');
$conn->executeUpdate('DELETE FROM vct_inversed_onetomany'); $conn->executeUpdate('DELETE FROM vct_inversed_onetomany');
}
if (isset($this->_usedModelSets['vct_onetomany_compositeid'])) {
$conn->executeUpdate('DELETE FROM vct_owning_manytoone_compositeid'); $conn->executeUpdate('DELETE FROM vct_owning_manytoone_compositeid');
$conn->executeUpdate('DELETE FROM vct_inversed_onetomany_compositeid'); $conn->executeUpdate('DELETE FROM vct_inversed_onetomany_compositeid');
}
if (isset($this->_usedModelSets['vct_onetomany_compositeid_foreignkey'])) {
$conn->executeUpdate('DELETE FROM vct_owning_manytoone_compositeid_foreignkey'); $conn->executeUpdate('DELETE FROM vct_owning_manytoone_compositeid_foreignkey');
$conn->executeUpdate('DELETE FROM vct_inversed_onetomany_compositeid_foreignkey'); $conn->executeUpdate('DELETE FROM vct_inversed_onetomany_compositeid_foreignkey');
$conn->executeUpdate('DELETE FROM vct_auxiliary'); $conn->executeUpdate('DELETE FROM vct_auxiliary');
}
if (isset($this->_usedModelSets['vct_onetomany_extralazy'])) {
$conn->executeUpdate('DELETE FROM vct_owning_manytoone_extralazy'); $conn->executeUpdate('DELETE FROM vct_owning_manytoone_extralazy');
$conn->executeUpdate('DELETE FROM vct_inversed_onetomany_extralazy'); $conn->executeUpdate('DELETE FROM vct_inversed_onetomany_extralazy');
}
if (isset($this->_usedModelSets['vct_manytomany'])) {
$conn->executeUpdate('DELETE FROM vct_xref_manytomany'); $conn->executeUpdate('DELETE FROM vct_xref_manytomany');
$conn->executeUpdate('DELETE FROM vct_owning_manytomany'); $conn->executeUpdate('DELETE FROM vct_owning_manytomany');
$conn->executeUpdate('DELETE FROM vct_inversed_manytomany'); $conn->executeUpdate('DELETE FROM vct_inversed_manytomany');
}
if (isset($this->_usedModelSets['vct_manytomany_compositeid'])) {
$conn->executeUpdate('DELETE FROM vct_xref_manytomany_compositeid'); $conn->executeUpdate('DELETE FROM vct_xref_manytomany_compositeid');
$conn->executeUpdate('DELETE FROM vct_owning_manytomany_compositeid'); $conn->executeUpdate('DELETE FROM vct_owning_manytomany_compositeid');
$conn->executeUpdate('DELETE FROM vct_inversed_manytomany_compositeid'); $conn->executeUpdate('DELETE FROM vct_inversed_manytomany_compositeid');
}
if (isset($this->_usedModelSets['vct_manytomany_compositeid_foreignkey'])) {
$conn->executeUpdate('DELETE FROM vct_xref_manytomany_compositeid_foreignkey'); $conn->executeUpdate('DELETE FROM vct_xref_manytomany_compositeid_foreignkey');
$conn->executeUpdate('DELETE FROM vct_owning_manytomany_compositeid_foreignkey'); $conn->executeUpdate('DELETE FROM vct_owning_manytomany_compositeid_foreignkey');
$conn->executeUpdate('DELETE FROM vct_inversed_manytomany_compositeid_foreignkey'); $conn->executeUpdate('DELETE FROM vct_inversed_manytomany_compositeid_foreignkey');
$conn->executeUpdate('DELETE FROM vct_auxiliary'); $conn->executeUpdate('DELETE FROM vct_auxiliary');
}
if (isset($this->_usedModelSets['vct_manytomany_extralazy'])) {
$conn->executeUpdate('DELETE FROM vct_xref_manytomany_extralazy'); $conn->executeUpdate('DELETE FROM vct_xref_manytomany_extralazy');
$conn->executeUpdate('DELETE FROM vct_owning_manytomany_extralazy'); $conn->executeUpdate('DELETE FROM vct_owning_manytomany_extralazy');
$conn->executeUpdate('DELETE FROM vct_inversed_manytomany_extralazy'); $conn->executeUpdate('DELETE FROM vct_inversed_manytomany_extralazy');
@ -456,8 +507,14 @@ abstract class OrmFunctionalTestCase extends OrmTestCase
{ {
$this->setUpDBALTypes(); $this->setUpDBALTypes();
$forceCreateTables = false;
if ( ! isset(static::$_sharedConn)) { if ( ! isset(static::$_sharedConn)) {
static::$_sharedConn = TestUtil::getConnection(); static::$_sharedConn = TestUtil::getConnection();
if (static::$_sharedConn->getDriver() instanceof \Doctrine\DBAL\Driver\PDOSqlite\Driver) {
$forceCreateTables = true;
}
} }
if (isset($GLOBALS['DOCTRINE_MARK_SQL_LOGS'])) { if (isset($GLOBALS['DOCTRINE_MARK_SQL_LOGS'])) {
@ -470,7 +527,7 @@ abstract class OrmFunctionalTestCase extends OrmTestCase
if ( ! $this->_em) { if ( ! $this->_em) {
$this->_em = $this->_getEntityManager(); $this->_em = $this->_getEntityManager();
$this->_schemaTool = new SchemaTool($this->_em); $this->_schemaTool = new \Doctrine\ORM\Tools\SchemaTool($this->_em);
} }
$classes = array(); $classes = array();