Jeroen De Dauw has uploaded a new change for review.
https://gerrit.wikimedia.org/r/149229
Change subject: DM 1.0 compat: do not use Entity::toArray
......................................................................
DM 1.0 compat: do not use Entity::toArray
Change-Id: If105c2f224dfa8ac9fb928935dc9dd2db5f82700
---
M repo/tests/phpunit/includes/EditEntityTest.php
1 file changed, 1 insertion(+), 23 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase
refs/changes/29/149229/1
diff --git a/repo/tests/phpunit/includes/EditEntityTest.php
b/repo/tests/phpunit/includes/EditEntityTest.php
index 6380c6d..d7327be 100644
--- a/repo/tests/phpunit/includes/EditEntityTest.php
+++ b/repo/tests/phpunit/includes/EditEntityTest.php
@@ -208,9 +208,6 @@
12, // base rev
true, // expected conflict
true, // expected fix
- array( // expected data
- 'label' => array( 'en' => 'test', 'de'
=> 'yarrr' ),
- )
),
array( // #3: case IIIb: user was last to edit, but
intoduces a new operand
array( // input data
@@ -219,7 +216,6 @@
11, // base rev
true, // expected conflict
false, // expected failure, diff operand change
- null
),
array( // #4: case IV: patch applied
array( // input data
@@ -228,10 +224,6 @@
10, // base rev
true, // expected conflict
true, // expected fix
- array( // expected data
- 'label' => array( 'de' => 'bar', 'en'
=> 'test',
- 'nl' => 'test', 'fr'
=> 'frrrrtt' ),
- )
),
array( // #5: case V: patch failed, expect a conflict
array( // input data
@@ -240,7 +232,6 @@
10, // base rev
true, // expected conflict
false, // expected fix
- null // expected data
),
array( // #6: case VI: patch is empty, keep current
(not base)
array( // input data
@@ -249,10 +240,6 @@
12, // base rev
true, // expected conflict
true, // expected fix
- array( // expected data
- 'label' => array( 'en' => 'test', 'de'
=> 'bar' ),
- 'description' => array( 'en' => 'more
testing' )
- )
),
);
}
@@ -260,7 +247,7 @@
/**
* @dataProvider provideHasEditConflict
*/
- public function testHasEditConflict( $inputData, $baseRevisionId,
$expectedConflict, $expectedFix, array $expectedData = null ) {
+ public function testHasEditConflict( $inputData, $baseRevisionId,
$expectedConflict, $expectedFix ) {
$repo = $this->makeMockRepo();
$entityId = new ItemId( 'Q17' );
@@ -302,15 +289,6 @@
if ( $conflict ) {
$fixed = $editEntity->fixEditConflict();
$this->assertEquals( $expectedFix, $fixed,
'fixEditConflict()' );
- }
-
- if ( $expectedData !== null ) {
- $data = $editEntity->getNewEntity()->toArray();
-
- foreach ( $expectedData as $key => $expectedValue ) {
- $actualValue = $data[$key];
- $this->assertArrayEquals( $expectedValue,
$actualValue, false, true );
- }
}
}
--
To view, visit https://gerrit.wikimedia.org/r/149229
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: If105c2f224dfa8ac9fb928935dc9dd2db5f82700
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Jeroen De Dauw <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits