summaryrefslogtreecommitdiff
path: root/tests/phpunit/includes/XmlJsTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/phpunit/includes/XmlJsTest.php')
-rw-r--r--tests/phpunit/includes/XmlJsTest.php25
1 files changed, 20 insertions, 5 deletions
diff --git a/tests/phpunit/includes/XmlJsTest.php b/tests/phpunit/includes/XmlJsTest.php
index c5b411fb..161468e2 100644
--- a/tests/phpunit/includes/XmlJsTest.php
+++ b/tests/phpunit/includes/XmlJsTest.php
@@ -1,9 +1,24 @@
<?php
+
+/**
+ * @group Xml
+ */
class XmlJs extends MediaWikiTestCase {
- public function testConstruction() {
- $obj = new XmlJsCode( null );
- $this->assertNull( $obj->value );
- $obj = new XmlJsCode( '' );
- $this->assertSame( $obj->value, '' );
+
+ /**
+ * @covers XmlJsCode::__construct
+ * @dataProvider provideConstruction
+ */
+ public function testConstruction( $value ) {
+ $obj = new XmlJsCode( $value );
+ $this->assertEquals( $value, $obj->value );
}
+
+ public function provideConstruction(){
+ return array(
+ array( null ),
+ array( '' ),
+ );
+ }
+
}