Skip to content
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

fix: QueryBuilder limit(0) bug #8280

Merged
merged 14 commits into from
Dec 16, 2023
Prev Previous commit
Next Next commit
test: update test code
  • Loading branch information
kenjis committed Dec 9, 2023
commit 7f7029ef53e694033af9d9d6b7e8ed766b847b55
3 changes: 3 additions & 0 deletions tests/system/Database/Builder/GetTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ public function testGet(): void
*/
public function testGetWithReset(): void
{
$config = config(Feature::class);
$config->limitZeroAsAll = false;

$builder = $this->db->table('users');
$builder->testMode()->where('username', 'bogus');

Expand Down
3 changes: 3 additions & 0 deletions tests/system/Database/Live/GetTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ public function testGetWitLimit(): void

public function testGetWithLimitZero(): void
{
$config = config(Feature::class);
$config->limitZeroAsAll = false;

$jobs = $this->db->table('job')->limit(0)->get()->getResult();

$this->assertCount(0, $jobs);
Expand Down