Skip to content

Commit

Permalink
Merge pull request propelorm#1980 from mringler/bugfix/fix_order_in_t…
Browse files Browse the repository at this point in the history
…est_assertion

fix broken test on Postgres with PHP 8.2
  • Loading branch information
gechetspr authored Dec 7, 2023
2 parents 6558606 + bf3ebb5 commit 8d22484
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tests/Propel/Tests/Runtime/ActiveQuery/ExistsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public function testWhereExists()
[$author1, $author2, $author3] = $this->createTestData();
// all authors with at least one good book
$existsQueryCriteria = BookQuery::create()->filterByTitle('good')->where('Book.AuthorId = Author.Id');
$authors = AuthorQuery::create()->whereExists($existsQueryCriteria)->find($this->con)->getData();
$authors = AuthorQuery::create()->whereExists($existsQueryCriteria)->orderById()->find($this->con)->getData();

$this->assertEquals([$author1, $author3], $authors);
}
Expand All @@ -57,7 +57,7 @@ public function testWhereNotExists()
[$author1, $author2, $author3, $author4] = $this->createTestData();
// all authors with no bad book
$existsQueryCriteria = BookQuery::create()->filterByTitle('bad')->where('Book.AuthorId = Author.Id');
$authors = AuthorQuery::create()->whereNotExists($existsQueryCriteria)->find($this->con)->getData();
$authors = AuthorQuery::create()->whereNotExists($existsQueryCriteria)->orderById()->find($this->con)->getData();

$this->assertEquals([$author3, $author4], $authors);
}
Expand Down Expand Up @@ -109,6 +109,7 @@ public function testUseExistsQuery()
->useExistsQuery('Book')
->filterByTitle('good')
->endUse()
->orderById()
->find($this->con)
->getData();

Expand All @@ -126,6 +127,7 @@ public function testUseNotExistsQuery()
->useNotExistsQuery('Book')
->filterByTitle('bad')
->endUse()
->orderById()
->find($this->con)
->getData();

Expand Down Expand Up @@ -187,6 +189,7 @@ public function testUseExistsQueryWithSpecificClass()
->useExistsQuery('Book', null, GoodBookQuery::class)
->filterByIsGood()
->endUse()
->orderById()
->find($this->con)
->getData();

Expand Down

0 comments on commit 8d22484

Please sign in to comment.