Skip to content

Commit

Permalink
Merge pull request doctrine#809 from FabioBatSilva/DDC-1514
Browse files Browse the repository at this point in the history
Fix DDC-1514 test
  • Loading branch information
guilhermeblanco committed Oct 2, 2013
2 parents 2c4c26c + dd4bdd7 commit 2021d12
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1514Test.php
Expand Up @@ -29,10 +29,10 @@ protected function setUp()
public function testIssue()
{
$a1 = new DDC1514EntityA();
$a1->title = "foo";
$a1->title = "1foo";

$a2 = new DDC1514EntityA();
$a2->title = "bar";
$a2->title = "2bar";

$b1 = new DDC1514EntityB();
$b1->entityAFrom = $a1;
Expand All @@ -54,9 +54,13 @@ public function testIssue()
$this->_em->flush();
$this->_em->clear();

$dql = "SELECT a, b, ba, c FROM " . __NAMESPACE__ . "\DDC1514EntityA AS a LEFT JOIN a.entitiesB AS b LEFT JOIN b.entityATo AS ba LEFT JOIN a.entityC AS c";
$dql = "SELECT a, b, ba, c FROM " . __NAMESPACE__ . "\DDC1514EntityA AS a LEFT JOIN a.entitiesB AS b LEFT JOIN b.entityATo AS ba LEFT JOIN a.entityC AS c ORDER BY a.title";
$results = $this->_em->createQuery($dql)->getResult();

$this->assertEquals($a1->id, $results[0]->id);
$this->assertNull($results[0]->entityC);

$this->assertEquals($a2->id, $results[1]->id);
$this->assertEquals($c->title, $results[1]->entityC->title);
}
}
Expand Down

0 comments on commit 2021d12

Please sign in to comment.