Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d08c57a

Browse files
committed
doctrine#1277 DDC-3346 DDC-3531 - minor CS fixes/cleanups: avoiding setters
1 parent e4aeffd commit d08c57a

1 file changed

Lines changed: 11 additions & 12 deletions

File tree

tests/Doctrine/Tests/ORM/Functional/Ticket/DDC3346Test.php

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -21,19 +21,19 @@ public function setUp()
2121

2222
public function testFindOneWithEagerFetchWillNotHydrateLimitedCollection()
2323
{
24-
/** @var DDC3346Author $author */
24+
/* @var DDC3346Author $author */
2525
$author = $this->_em->getRepository(DDC3346Author::CLASSNAME)->findOneBy(
26-
array('username' => "bwoogy")
26+
array('username' => 'bwoogy')
2727
);
2828

2929
$this->assertCount(2, $author->articles);
3030
}
3131

3232
public function testFindLimitedWithEagerFetchWillNotHydrateLimitedCollection()
3333
{
34-
/** @var DDC3346Author[] $authors */
34+
/* @var DDC3346Author[] $authors */
3535
$authors = $this->_em->getRepository(DDC3346Author::CLASSNAME)->findBy(
36-
array('username' => "bwoogy"),
36+
array('username' => 'bwoogy'),
3737
null,
3838
1
3939
);
@@ -44,9 +44,9 @@ public function testFindLimitedWithEagerFetchWillNotHydrateLimitedCollection()
4444

4545
public function testFindWithEagerFetchAndOffsetWillNotHydrateLimitedCollection()
4646
{
47-
/** @var DDC3346Author[] $authors */
47+
/* @var DDC3346Author[] $authors */
4848
$authors = $this->_em->getRepository(DDC3346Author::CLASSNAME)->findBy(
49-
array('username' => "bwoogy"),
49+
array('username' => 'bwoogy'),
5050
null,
5151
null,
5252
1
@@ -58,14 +58,13 @@ public function testFindWithEagerFetchAndOffsetWillNotHydrateLimitedCollection()
5858

5959
private function loadAuthorFixture()
6060
{
61-
$user = new DDC3346Author();
62-
$user->username = "bwoogy";
63-
61+
$user = new DDC3346Author();
6462
$article1 = new DDC3346Article();
65-
$article1->setAuthor($user);
66-
6763
$article2 = new DDC3346Article();
68-
$article2->setAuthor($user);
64+
65+
$user->username = 'bwoogy';
66+
$article1->user = $user;
67+
$article2->user = $user;
6968

7069
$this->_em->persist($user);
7170
$this->_em->persist($article1);

0 commit comments

Comments
 (0)