jenkins-bot has submitted this change and it was merged.
Change subject: Avoid wfEscapeWikiText on expected values in tests
......................................................................
Avoid wfEscapeWikiText on expected values in tests
I believe this should not be done. The expected output should be a
string, containing the expected output.
This is a direct follow up, fixing the comments I wrote in Ia9e6965.
Change-Id: I9993a1ad17c97681993203ab3444508f622462dc
---
M
client/tests/phpunit/includes/DataAccess/DataAccessSnakFormatterOutputFormatTest.php
1 file changed, 12 insertions(+), 12 deletions(-)
Approvals:
Hoo man: Looks good to me, approved
jenkins-bot: Verified
diff --git
a/client/tests/phpunit/includes/DataAccess/DataAccessSnakFormatterOutputFormatTest.php
b/client/tests/phpunit/includes/DataAccess/DataAccessSnakFormatterOutputFormatTest.php
index 22697ac..cc1f205 100644
---
a/client/tests/phpunit/includes/DataAccess/DataAccessSnakFormatterOutputFormatTest.php
+++
b/client/tests/phpunit/includes/DataAccess/DataAccessSnakFormatterOutputFormatTest.php
@@ -143,14 +143,14 @@
new StringValue( 'a b c' )
)
],
- 'wikibase-item label (wikibase-entityid)' => [
- '<span>' . wfEscapeWikiText( 'label [[with]]
wikitext' ) . '</span>',
+ 'wikibase-entityid without sitelink' => [
+ '<span>label [[with]]
wikitext</span>',
new PropertyValueSnak(
new PropertyId( 'P9' ),
new EntityIdValue( new ItemId( 'Q12' ) )
)
],
- 'linked wikibase-item (wikibase-entityid)' => [
+ 'wikibase-entityid with sitelink' => [
'<span>[[Linked page|This item has a
sitelink]]</span>',
new PropertyValueSnak(
new PropertyId( 'P9' ),
@@ -190,21 +190,21 @@
)
],
'globecoordinate' => [
- wfEscapeWikiText( '12°0\'0"N, 34°0\'0"E' ),
+ '12°0'0"N, 34°0'0"E',
new PropertyValueSnak(
new PropertyId( 'P2' ),
new GlobeCoordinateValue( new
LatLongValue( 12, 34 ), null )
)
],
'monolingualtext' => [
- wfEscapeWikiText( 'a [[b]] c' ),
+ 'a [[b]] c',
new PropertyValueSnak(
new PropertyId( 'P3' ),
new MonolingualTextValue( 'es', 'a
[[b]] c' )
)
],
'quantity' => [
- wfEscapeWikiText( '42 a [[b]] c' ),
+ '42 a [[b]] c',
new PropertyValueSnak(
$p4,
new QuantityValue(
@@ -216,7 +216,7 @@
)
],
'quantity with unit' => [
- wfEscapeWikiText( '42 label [[with]] wikitext'
),
+ '42 label [[with]] wikitext',
new PropertyValueSnak(
$p4,
new QuantityValue(
@@ -228,7 +228,7 @@
)
],
'string including wikitext' => [
- wfEscapeWikiText( 'a [[b]] c' ),
+ 'a [[b]] c',
new PropertyValueSnak(
new PropertyId( 'P5' ),
new StringValue( 'a [[b]] c' )
@@ -261,7 +261,7 @@
)
],
'external-id including wikitext' => [
- wfEscapeWikiText( 'a [[b]] c' ),
+ 'a [[b]] c',
new PropertyValueSnak(
new PropertyId( 'P8' ),
new StringValue( 'a [[b]] c' )
@@ -274,14 +274,14 @@
new StringValue( 'a b c' )
)
],
- 'wikibase-item label (wikibase-entityid)' => [
- wfEscapeWikiText( 'label [[with]] wikitext' ),
+ 'wikibase-entityid without sitelink' => [
+ 'label [[with]] wikitext',
new PropertyValueSnak(
new PropertyId( 'P9' ),
new EntityIdValue( new ItemId( 'Q12' ) )
)
],
- 'linked wikibase-item (wikibase-entityid)' => [
+ 'wikibase-entityid with sitelink' => [
'This item has a sitelink',
new PropertyValueSnak(
new PropertyId( 'P9' ),
--
To view, visit https://gerrit.wikimedia.org/r/317476
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I9993a1ad17c97681993203ab3444508f622462dc
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Thiemo Mättig (WMDE) <[email protected]>
Gerrit-Reviewer: Hoo man <[email protected]>
Gerrit-Reviewer: Jonas Kress (WMDE) <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits