8000 Fix non-deterministic test by mbeccati · Pull Request #11866 · doctrine/orm · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fix non-deterministic test #11866

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 13, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions tests/Tests/ORM/Functional/QueryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -558,7 +558,9 @@ public function testModifiedLimitQuery(): void
$this->_em->flush();
$this->_em->clear();

$data = $this->_em->createQuery('SELECT u FROM ' . CmsUser::class . ' u')
$query = 'SELECT u FROM ' . CmsUser::class . ' u ORDER BY u.username';

$data = $this->_em->createQuery($query)
->setFirstResult(1)
->setMaxResults(2)
->getResult();
Expand All @@ -567,7 +569,7 @@ public function testModifiedLimitQuery(): void
self::assertEquals('gblanco1', $data[0]->username);
self::assertEquals('gblanco2', $data[1]->username);

$data = $this->_em->createQuery('SELECT u FROM ' . CmsUser::class . ' u')
$data = $this->_em->createQuery($query)
->setFirstResult(3)
->setMaxResults(2)
->getResult();
Expand All @@ -576,7 +578,7 @@ public function testModifiedLimitQuery(): void
self::assertEquals('gblanco3', $data[0]->username);
self::assertEquals('gblanco4', $data[1]->username);

$data = $this->_em->createQuery('SELECT u FROM ' . CmsUser::class . ' u')
$data = $this->_em->createQuery($query)
->setFirstResult(3)
->setMaxResults(2)
->getScalarResult();
Expand Down
0