Skip to content

Commit

Permalink
doctrine#1277 DDC-3346 DDC-3531 - correct usage of the model set (set…
Browse files Browse the repository at this point in the history
…Up/tearDown of model-related tables)
  • Loading branch information
Ocramius committed Jan 23, 2015
1 parent 35bccf3 commit 33230e5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
7 changes: 2 additions & 5 deletions tests/Doctrine/Tests/ORM/Functional/Ticket/DDC3346Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
9 changes: 9 additions & 0 deletions tests/Doctrine/Tests/OrmFunctionalTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -399,6 +403,11 @@ protected function tearDown()
$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"));
Expand Down

0 comments on commit 33230e5

Please sign in to comment.