jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/392391 )
Change subject: Tests for TitleValue::__toString
......................................................................
Tests for TitleValue::__toString
Change-Id: Ibb157b8e6e4fdc75bdb27ecaa4a552304465c4b2
---
M tests/phpunit/includes/title/TitleValueTest.php
1 file changed, 29 insertions(+), 0 deletions(-)
Approvals:
Daniel Kinzler: Looks good to me, but someone else must approve
jenkins-bot: Verified
Thiemo Mättig (WMDE): Looks good to me, approved
diff --git a/tests/phpunit/includes/title/TitleValueTest.php
b/tests/phpunit/includes/title/TitleValueTest.php
index 4dbda74..f833554 100644
--- a/tests/phpunit/includes/title/TitleValueTest.php
+++ b/tests/phpunit/includes/title/TitleValueTest.php
@@ -116,4 +116,33 @@
$this->assertEquals( $text, $title->getText() );
}
+
+ public function provideTestToString() {
+ yield [
+ new TitleValue( 0, 'Foo' ),
+ '0:Foo'
+ ];
+ yield [
+ new TitleValue( 1, 'Bar_Baz' ),
+ '1:Bar_Baz'
+ ];
+ yield [
+ new TitleValue( 9, 'JoJo', 'Frag' ),
+ '9:JoJo#Frag'
+ ];
+ yield [
+ new TitleValue( 200, 'tea', 'Fragment', 'wikicode' ),
+ 'wikicode:200:tea#Fragment'
+ ];
+ }
+
+ /**
+ * @dataProvider provideTestToString
+ */
+ public function testToString( TitleValue $value, $expected ) {
+ $this->assertSame(
+ $expected,
+ $value->__toString()
+ );
+ }
}
--
To view, visit https://gerrit.wikimedia.org/r/392391
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ibb157b8e6e4fdc75bdb27ecaa4a552304465c4b2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Addshore <[email protected]>
Gerrit-Reviewer: Addshore <[email protected]>
Gerrit-Reviewer: Daniel Kinzler <[email protected]>
Gerrit-Reviewer: Legoktm <[email protected]>
Gerrit-Reviewer: Thiemo Mättig (WMDE) <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits