jenkins-bot has submitted this change and it was merged.
Change subject: Fix 2 broken tests on repo
......................................................................
Fix 2 broken tests on repo
1. TimeValue will not support empty strings any more in the next
data-values/time version.
2. The large number causes an integer overflow in my 32 bit PHP.
Change-Id: I987519aacc71f677f91488699af0035230537aa0
---
M repo/tests/phpunit/includes/ValidatorBuildersTest.php
M repo/tests/phpunit/includes/actions/ViewEntityActionTest.php
2 files changed, 3 insertions(+), 3 deletions(-)
Approvals:
Hoo man: Looks good to me, approved
jenkins-bot: Verified
diff --git a/repo/tests/phpunit/includes/ValidatorBuildersTest.php
b/repo/tests/phpunit/includes/ValidatorBuildersTest.php
index 418fa9c..0de603e 100644
--- a/repo/tests/phpunit/includes/ValidatorBuildersTest.php
+++ b/repo/tests/phpunit/includes/ValidatorBuildersTest.php
@@ -106,7 +106,7 @@
array( 'time', new NumberValue( 7 ), false, 'TimeValue
expected' ),
//time['calendar-model']
- array( 'time', new TimeValue(
'+0000000000002013-06-06T00:00:00Z', 0, 0, 0, TimeValue::PRECISION_DAY, '' ),
false, 'calendar: empty string should be invalid' ),
+ array( 'time', new TimeValue(
'+0000000000002013-06-06T00:00:00Z', 0, 0, 0, TimeValue::PRECISION_DAY, '1' ),
false, 'calendar: too short' ),
array( 'time', new TimeValue(
'+0000000000002013-06-06T00:00:00Z', 0, 0, 0, TimeValue::PRECISION_DAY,
'http://' . str_repeat('x', 256) ), false, 'calendar: too long' ),
array( 'time', new TimeValue(
'+0000000000002013-06-06T00:00:00Z', 0, 0, 0, TimeValue::PRECISION_DAY,
'http://acme.com/calendar' ), true, 'calendar: URL' ),
array( 'time', new TimeValue(
'+0000000000002013-06-06T00:00:00Z', 0, 0, 0, TimeValue::PRECISION_DAY, '
http://acme.com/calendar ' ), false, 'calendar: untrimmed' ),
diff --git a/repo/tests/phpunit/includes/actions/ViewEntityActionTest.php
b/repo/tests/phpunit/includes/actions/ViewEntityActionTest.php
index bb3339f..5894b4c 100644
--- a/repo/tests/phpunit/includes/actions/ViewEntityActionTest.php
+++ b/repo/tests/phpunit/includes/actions/ViewEntityActionTest.php
@@ -101,10 +101,10 @@
public function testShowNonExistingRevision() {
$page = $this->getTestItemPage( 'Berlin' );
- $params = array( 'oldid' => 95829689425 );
+ $params = array( 'oldid' => 2147483647 );
$html = $this->executeViewAction( $page, $params );
- $this->assertContains( 'Die Version 95829689425', $html,
'non-existing revision' );
+ $this->assertContains( 'Die Version 2147483647', $html,
'non-existing revision' );
}
/**
--
To view, visit https://gerrit.wikimedia.org/r/204250
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I987519aacc71f677f91488699af0035230537aa0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Thiemo Mättig (WMDE) <[email protected]>
Gerrit-Reviewer: Aude <[email protected]>
Gerrit-Reviewer: Hoo man <[email protected]>
Gerrit-Reviewer: JanZerebecki <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits