Skip to content

Commit 8d22484

Browse files
authored
Merge pull request #1980 from mringler/bugfix/fix_order_in_test_assertion
fix broken test on Postgres with PHP 8.2
2 parents 6558606 + bf3ebb5 commit 8d22484

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

tests/Propel/Tests/Runtime/ActiveQuery/ExistsTest.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public function testWhereExists()
4444
[$author1, $author2, $author3] = $this->createTestData();
4545
// all authors with at least one good book
4646
$existsQueryCriteria = BookQuery::create()->filterByTitle('good')->where('Book.AuthorId = Author.Id');
47-
$authors = AuthorQuery::create()->whereExists($existsQueryCriteria)->find($this->con)->getData();
47+
$authors = AuthorQuery::create()->whereExists($existsQueryCriteria)->orderById()->find($this->con)->getData();
4848

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

6262
$this->assertEquals([$author3, $author4], $authors);
6363
}
@@ -109,6 +109,7 @@ public function testUseExistsQuery()
109109
->useExistsQuery('Book')
110110
->filterByTitle('good')
111111
->endUse()
112+
->orderById()
112113
->find($this->con)
113114
->getData();
114115

@@ -126,6 +127,7 @@ public function testUseNotExistsQuery()
126127
->useNotExistsQuery('Book')
127128
->filterByTitle('bad')
128129
->endUse()
130+
->orderById()
129131
->find($this->con)
130132
->getData();
131133

@@ -187,6 +189,7 @@ public function testUseExistsQueryWithSpecificClass()
187189
->useExistsQuery('Book', null, GoodBookQuery::class)
188190
->filterByIsGood()
189191
->endUse()
192+
->orderById()
190193
->find($this->con)
191194
->getData();
192195

0 commit comments

Comments
 (0)