Skip to content

Commit

Permalink
Add test for count greater than PHP_INT_MAX
Browse files Browse the repository at this point in the history
  • Loading branch information
Tigrov committed Nov 16, 2023
1 parent fcb5734 commit 17c924b
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests/AbstractQueryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -787,4 +787,18 @@ public function testNormalizeSelect(array|string|Expression $columns, array|stri
$query->select($columns);
$this->assertEquals($expected, $query->getSelect());
}

public function testCountGreaterThanPhpIntMax(): void
{
$query = $this->getMockBuilder(Query::class)
->setConstructorArgs([$this->getConnection()])
->onlyMethods(['queryScalar'])
->getMock();

$query->expects($this->once())
->method('queryScalar')
->willReturn('12345678901234567890');

$this->assertSame('12345678901234567890', $query->count());
}
}

0 comments on commit 17c924b

Please sign in to comment.