From bf3ebb5f4eb95eb526dbd91483f198af05a585eb Mon Sep 17 00:00:00 2001 From: mringler Date: Sat, 30 Sep 2023 00:45:44 +0200 Subject: [PATCH] add order to queries in tests --- tests/Propel/Tests/Runtime/ActiveQuery/ExistsTest.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/Propel/Tests/Runtime/ActiveQuery/ExistsTest.php b/tests/Propel/Tests/Runtime/ActiveQuery/ExistsTest.php index dae14555dc..bef19f8da0 100644 --- a/tests/Propel/Tests/Runtime/ActiveQuery/ExistsTest.php +++ b/tests/Propel/Tests/Runtime/ActiveQuery/ExistsTest.php @@ -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); } @@ -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); } @@ -109,6 +109,7 @@ public function testUseExistsQuery() ->useExistsQuery('Book') ->filterByTitle('good') ->endUse() + ->orderById() ->find($this->con) ->getData(); @@ -126,6 +127,7 @@ public function testUseNotExistsQuery() ->useNotExistsQuery('Book') ->filterByTitle('bad') ->endUse() + ->orderById() ->find($this->con) ->getData(); @@ -187,6 +189,7 @@ public function testUseExistsQueryWithSpecificClass() ->useExistsQuery('Book', null, GoodBookQuery::class) ->filterByIsGood() ->endUse() + ->orderById() ->find($this->con) ->getData();