MediaWiki  1.23.8
XmlTypeCheckTest.php
Go to the documentation of this file.
1 <?php
9  const WELL_FORMED_XML = "<root><child /></root>";
10  const MAL_FORMED_XML = "<root><child /></error>";
11 
16  public function testWellFormedXML() {
17  $testXML = XmlTypeCheck::newFromString( self::WELL_FORMED_XML );
18  $this->assertTrue( $testXML->wellFormed );
19  $this->assertEquals( 'root', $testXML->getRootElement() );
20  }
21 
25  public function testMalFormedXML() {
26  $testXML = XmlTypeCheck::newFromString( self::MAL_FORMED_XML );
27  $this->assertFalse( $testXML->wellFormed );
28  }
29 
30 }
php
skin txt MediaWiki includes four core it has been set as the default in MediaWiki since the replacing Monobook it had been been the default skin since before being replaced by Vector largely rewritten in while keeping its appearance Several legacy skins were removed in the as the burden of supporting them became too heavy to bear Those in etc for skin dependent CSS etc for skin dependent JavaScript These can also be customised on a per user by etc This feature has led to a wide variety of user styles becoming that gallery is a good place to ending in php
Definition: skin.txt:62
XmlTypeCheckTest\testMalFormedXML
testMalFormedXML()
@covers XMLTypeCheck::newFromString
Definition: XmlTypeCheckTest.php:25
XmlTypeCheck\newFromString
static newFromString( $string, $filterCallback=null)
Alternative constructor: from string.
Definition: XmlTypeCheck.php:115
XmlTypeCheckTest\MAL_FORMED_XML
const MAL_FORMED_XML
Definition: XmlTypeCheckTest.php:10
MediaWikiTestCase
Definition: MediaWikiTestCase.php:6
XmlTypeCheckTest\WELL_FORMED_XML
const WELL_FORMED_XML
Definition: XmlTypeCheckTest.php:9
XmlTypeCheckTest
PHPUnit tests for XMLTypeCheck.
Definition: XmlTypeCheckTest.php:8
XmlTypeCheckTest\testWellFormedXML
testWellFormedXML()
@covers XMLTypeCheck::newFromString @covers XMLTypeCheck::getRootElement
Definition: XmlTypeCheckTest.php:16