Remove messages.inc, rebuildLanguage.php, writeMessagesArray.inc
[mediawiki.git] / tests / phpunit / includes / XmlTypeCheckTest.php
blob8d6f1ed7ac4874abdf6c14e8ae7457e628a5dbf3
1 <?php
2 /**
3 * PHPUnit tests for XMLTypeCheck.
4 * @author physikerwelt
5 * @group Xml
6 * @covers XMLTypeCheck
7 */
8 class XmlTypeCheckTest extends MediaWikiTestCase {
9 const WELL_FORMED_XML = "<root><child /></root>";
10 const MAL_FORMED_XML = "<root><child /></error>";
12 /**
13 * @covers XMLTypeCheck::newFromString
14 * @covers XMLTypeCheck::getRootElement
16 public function testWellFormedXML() {
17 $testXML = XmlTypeCheck::newFromString( self::WELL_FORMED_XML );
18 $this->assertTrue( $testXML->wellFormed );
19 $this->assertEquals( 'root', $testXML->getRootElement() );
22 /**
23 * @covers XMLTypeCheck::newFromString
25 public function testMalFormedXML() {
26 $testXML = XmlTypeCheck::newFromString( self::MAL_FORMED_XML );
27 $this->assertFalse( $testXML->wellFormed );