From 39a8941d1bc8b56ea2f63010df4f4d59c5271709 Mon Sep 17 00:00:00 2001 From: Marco Pivetta Date: Fri, 23 Jan 2015 16:22:39 +0100 Subject: [PATCH] #1277 DDC-3346 DDC-3531 - minor CS fixes/cleanups: avoiding setters --- .../ORM/Functional/Ticket/DDC3346Test.php | 23 +++++++++---------- 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC3346Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC3346Test.php index b2e62f9a6..7aca1866a 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC3346Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC3346Test.php @@ -21,9 +21,9 @@ class DDC3346Test extends \Doctrine\Tests\OrmFunctionalTestCase public function testFindOneWithEagerFetchWillNotHydrateLimitedCollection() { - /** @var DDC3346Author $author */ + /* @var DDC3346Author $author */ $author = $this->_em->getRepository(DDC3346Author::CLASSNAME)->findOneBy( - array('username' => "bwoogy") + array('username' => 'bwoogy') ); $this->assertCount(2, $author->articles); @@ -31,9 +31,9 @@ class DDC3346Test extends \Doctrine\Tests\OrmFunctionalTestCase public function testFindLimitedWithEagerFetchWillNotHydrateLimitedCollection() { - /** @var DDC3346Author[] $authors */ + /* @var DDC3346Author[] $authors */ $authors = $this->_em->getRepository(DDC3346Author::CLASSNAME)->findBy( - array('username' => "bwoogy"), + array('username' => 'bwoogy'), null, 1 ); @@ -44,9 +44,9 @@ class DDC3346Test extends \Doctrine\Tests\OrmFunctionalTestCase public function testFindWithEagerFetchAndOffsetWillNotHydrateLimitedCollection() { - /** @var DDC3346Author[] $authors */ + /* @var DDC3346Author[] $authors */ $authors = $this->_em->getRepository(DDC3346Author::CLASSNAME)->findBy( - array('username' => "bwoogy"), + array('username' => 'bwoogy'), null, null, 1 @@ -58,14 +58,13 @@ class DDC3346Test extends \Doctrine\Tests\OrmFunctionalTestCase private function loadAuthorFixture() { - $user = new DDC3346Author(); - $user->username = "bwoogy"; - + $user = new DDC3346Author(); $article1 = new DDC3346Article(); - $article1->setAuthor($user); - $article2 = new DDC3346Article(); - $article2->setAuthor($user); + + $user->username = 'bwoogy'; + $article1->user = $user; + $article2->user = $user; $this->_em->persist($user); $this->_em->persist($article1);