test: coverage recording now needs to be explicit
[mediawiki.git] / tests / phpunit / includes / XmlTypeCheckTest.php
blob18f363fa7cd23206cab436eb50f21245551dbc34
1 <?php
2 /**
3 * PHPUnit tests for XMLTypeCheck.
4 * @author physikerwelt
5 * @group ?
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 );