diff --git a/tests/AbstractQueryTest.php b/tests/AbstractQueryTest.php index 63334ea9a..754cab5a3 100644 --- a/tests/AbstractQueryTest.php +++ b/tests/AbstractQueryTest.php @@ -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()); + } }