wiki.techinc.nl/tests/phpunit/unit/includes/HtmlJsCodeTest.php
Lucas Werkmeister 3c5a0c862f Html: Move encodeJsVar() + encodeJsCall() from Xml
These methods really belong in the Html class, not Xml. Leave behind
soft-deprecated Xml methods that forward to the Html ones, as well as a
class alias for HtmlJsCode (renamed from XmlJsCode).

Bug: T341779
Change-Id: I99a5f9de1411d4eb5ee30226b4e8ace3ea8b2c3b
2023-07-14 13:42:02 -04:00

18 lines
324 B
PHP

<?php
use MediaWiki\Html\HtmlJsCode;
/**
* @covers \MediaWiki\Html\HtmlJsCode
*/
class HtmlJsCodeTest extends MediaWikiUnitTestCase {
public function testConstruction() {
$obj = new HtmlJsCode( '' );
$this->assertSame( '', $obj->value );
$obj = new HtmlJsCode( null );
$this->assertNull( $obj->value );
}
}