From fd3ddd93e26c029b56882df4e9b47642bec296f7 Mon Sep 17 00:00:00 2001 From: Brad Jorsch Date: Sat, 17 Mar 2018 22:02:13 -0400 Subject: [PATCH] Fix WikiPageDbTestBase::testNewFromId_returnsNullOnNonExistingId This test is passing an "integer" that is beyond what even 64-bit PHP can properly represent as an integer, so it likely winds up passing it as '7.3574757437438E+19' to the database. MySQL, being MySQL, doesn't care much, but other DBs do. Change it to 2**31-1 instead. Change-Id: Ieba51f034eaa1c3eabb2ada6b1ce876beefd3bff --- tests/phpunit/includes/page/WikiPageDbTestBase.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/phpunit/includes/page/WikiPageDbTestBase.php b/tests/phpunit/includes/page/WikiPageDbTestBase.php index 6367a0f8ef..53b659f2e0 100644 --- a/tests/phpunit/includes/page/WikiPageDbTestBase.php +++ b/tests/phpunit/includes/page/WikiPageDbTestBase.php @@ -1390,7 +1390,7 @@ more stuff * @covers WikiPage::newFromID */ public function testNewFromId_returnsNullOnNonExistingId() { - $this->assertNull( WikiPage::newFromID( 73574757437437743743 ) ); + $this->assertNull( WikiPage::newFromID( 2147483647 ) ); } public function provideTestInsertProtectNullRevision() { -- 2.20.1