From e395c32aa3664db8788a64f2f535005bd302300a Mon Sep 17 00:00:00 2001 From: Timo Tijhof Date: Thu, 19 Apr 2018 00:09:53 +0100 Subject: [PATCH] API: Remove 1e3>1 test case from ApiBaseTest Follows-up d3da5e08d35f, which broke PHP 7.1 and PHP 7.2 test jobs. This isn't about logic in ApiBase, but about PHP's str-to-int logic which actually varies between PHP5 and PHP7. One maps it to 1000, the other as strict int 1 (with non-numerical text chopped off, the same as it would for 1foo). If we want to support 1e3 as part of the API itself, then we'd need to parse it ourselves and then add the test back. Bug: T192425 Change-Id: I6fc43f29425749a1abe785fefa312db6a98ea7cd (cherry picked from commit 9ded02ec8e255ee6b9ee213b278b1f9a86147051) --- tests/phpunit/includes/api/ApiBaseTest.php | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/phpunit/includes/api/ApiBaseTest.php b/tests/phpunit/includes/api/ApiBaseTest.php index dbedfc5ac8..4bffc742f6 100644 --- a/tests/phpunit/includes/api/ApiBaseTest.php +++ b/tests/phpunit/includes/api/ApiBaseTest.php @@ -1159,7 +1159,6 @@ class ApiBaseTest extends ApiTestCase { $integerTests = [ [ '+1', 1 ], [ '-1', -1 ], - [ '1e3', 1 ], [ '1.5', 1 ], [ '-1.5', -1 ], [ '1abc', 1 ], -- 2.20.1