From c6e7a8184973a4dc8432b9ce603bf9c422478594 Mon Sep 17 00:00:00 2001 From: Marco Pivetta Date: Thu, 5 Feb 2015 00:21:28 +0000 Subject: [PATCH] #1169 DDC-3343 - removing duplicate test method --- .../Functional/ExtraLazyCollectionTest.php | 55 +------------------ 1 file changed, 1 insertion(+), 54 deletions(-) diff --git a/tests/Doctrine/Tests/ORM/Functional/ExtraLazyCollectionTest.php b/tests/Doctrine/Tests/ORM/Functional/ExtraLazyCollectionTest.php index daf7a2613..06223e4e0 100644 --- a/tests/Doctrine/Tests/ORM/Functional/ExtraLazyCollectionTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/ExtraLazyCollectionTest.php @@ -6,7 +6,6 @@ use Doctrine\ORM\Mapping\ClassMetadataInfo; use Doctrine\Tests\Models\Tweet\Tweet; use Doctrine\Tests\Models\Tweet\User; use Doctrine\Tests\Models\Tweet\UserList; -use Doctrine\Tests\OrmFunctionalTestCase; require_once __DIR__ . '/../../TestInit.php'; @@ -29,6 +28,7 @@ class ExtraLazyCollectionTest extends \Doctrine\Tests\OrmFunctionalTestCase $this->useModelSet('tweet'); $this->useModelSet('cms'); $this->useModelSet('tweet'); + parent::setUp(); $class = $this->_em->getClassMetadata('Doctrine\Tests\Models\CMS\CmsUser'); @@ -655,7 +655,6 @@ class ExtraLazyCollectionTest extends \Doctrine\Tests\OrmFunctionalTestCase $this->topic = $article1->topic; $this->phonenumber = $phonenumber1->phonenumber; - } /** @@ -739,27 +738,6 @@ class ExtraLazyCollectionTest extends \Doctrine\Tests\OrmFunctionalTestCase $this->assertCount(1, $user->tweets, 'Element was not removed - need to update the owning side first'); } - /** - * @return int[] ordered tuple: user id and tweet id - */ - private function loadTweetFixture() - { - $user = new User(); - $tweet = new Tweet(); - - $user->name = 'ocramius'; - $tweet->content = 'The cat is on the table'; - - $user->addTweet($tweet); - - $this->_em->persist($user); - $this->_em->persist($tweet); - $this->_em->flush(); - $this->_em->clear(); - - return array($user->id, $tweet->id); - } - /** * @group DDC-3343 */ @@ -805,37 +783,6 @@ class ExtraLazyCollectionTest extends \Doctrine\Tests\OrmFunctionalTestCase $this->assertNull($tweet->author, 'Tweet author link has been removed'); } - /** - * @group DDC-3343 - */ - public function testRemovingManagedLazyProxyFromExtraLazyOneToManyDoesRemoveTheAssociationButNotTheEntity() - { - list($userId, $tweetId) = $this->loadTweetFixture(); - - /* @var $user User */ - $user = $this->_em->find(User::CLASSNAME, $userId); - $tweet = $this->_em->getReference(Tweet::CLASSNAME, $tweetId); - - $user->tweets->removeElement($this->_em->getReference(Tweet::CLASSNAME, $tweetId)); - - $this->_em->clear(); - - /* @var $tweet Tweet */ - $tweet = $this->_em->find(Tweet::CLASSNAME, $tweet->id); - $this->assertInstanceOf( - Tweet::CLASSNAME, - $tweet, - 'Even though the collection is extra lazy, the tweet should not have been deleted' - ); - - $this->assertNull($tweet->author); - - /* @var $user User */ - $user = $this->_em->find(User::CLASSNAME, $userId); - - $this->assertCount(0, $user->tweets); - } - /** * @group DDC-3343 */