#1277 DDC-3346 DDC-3531 - correct usage of the model set (setUp/tearDown of model-related tables)
This commit is contained in:
parent
6e3ad496e2
commit
16f447d1ac
@ -12,12 +12,9 @@ class DDC3346Test extends \Doctrine\Tests\OrmFunctionalTestCase
|
||||
{
|
||||
public function setUp()
|
||||
{
|
||||
parent::setUp();
|
||||
$this->useModelSet('ddc3346');
|
||||
|
||||
$this->setUpEntitySchema(array(
|
||||
DDC3346Author::CLASSNAME,
|
||||
DDC3346Article::CLASSNAME,
|
||||
));
|
||||
parent::setUp();
|
||||
}
|
||||
|
||||
public function testFindOneWithEagerFetchWillNotHydrateLimitedCollection()
|
||||
|
@ -193,6 +193,10 @@ abstract class OrmFunctionalTestCase extends OrmTestCase
|
||||
'Doctrine\Tests\Models\DDC2504\DDC2504ChildClass',
|
||||
'Doctrine\Tests\Models\DDC2504\DDC2504OtherClass',
|
||||
),
|
||||
'ddc3346' => array(
|
||||
'Doctrine\Tests\Models\DDC3346\DDC3346Author',
|
||||
'Doctrine\Tests\Models\DDC3346\DDC3346Article',
|
||||
),
|
||||
'quote' => array(
|
||||
'Doctrine\Tests\Models\Quote\Address',
|
||||
'Doctrine\Tests\Models\Quote\Group',
|
||||
@ -399,6 +403,11 @@ abstract class OrmFunctionalTestCase extends OrmTestCase
|
||||
$conn->executeUpdate('DELETE FROM cache_country');
|
||||
}
|
||||
|
||||
if (isset($this->_usedModelSets['ddc3346'])) {
|
||||
$conn->executeUpdate('DELETE FROM ddc3346_articles');
|
||||
$conn->executeUpdate('DELETE FROM ddc3346_users');
|
||||
}
|
||||
|
||||
if (isset($this->_usedModelSets['quote'])) {
|
||||
$conn->executeUpdate('DELETE FROM ' . $platform->quoteIdentifier("quote-address"));
|
||||
$conn->executeUpdate('DELETE FROM ' . $platform->quoteIdentifier("quote-group"));
|
||||
|
Loading…
x
Reference in New Issue
Block a user