XmlJsTest.php 422 B

123456789101112131415161718192021222324252627
  1. <?php
  2. /**
  3. * @group Xml
  4. */
  5. class XmlJsTest extends PHPUnit\Framework\TestCase {
  6. use MediaWikiCoversValidator;
  7. /**
  8. * @covers XmlJsCode::__construct
  9. * @dataProvider provideConstruction
  10. */
  11. public function testConstruction( $value ) {
  12. $obj = new XmlJsCode( $value );
  13. $this->assertEquals( $value, $obj->value );
  14. }
  15. public static function provideConstruction() {
  16. return [
  17. [ null ],
  18. [ '' ],
  19. ];
  20. }
  21. }