Update LaTeXML test

* The LaTeXML server was updated. In the new version unneccary id's
  have been removed.

Change-Id: I25927912f1500ebfe6d61505c0e06ae2c24d6f6a
This commit is contained in:
physikerwelt (Moritz Schubotz) 2015-01-15 11:13:40 +01:00
parent c240a5c477
commit 056e85afe6

View File

@ -43,7 +43,7 @@ class MathLaTeXMLTest extends MediaWikiTestCase {
$this->setMwGlobals( 'wgMathValidModes', array( MW_MATH_LATEXML ) );
$renderer = MathRenderer::getRenderer( "a+b", array(), MW_MATH_LATEXML );
$this->assertTrue( $renderer->render( true ) );
$expected = '<math xmlns="http://www.w3.org/1998/Math/MathML" id="p1.1.m1.1" class="ltx_Math" alttext="{\displaystyle a+b}" xref="p1.1.m1.1.cmml"><semantics id="p1.1.m1.1a" xref="p1.1.m1.1.cmml"><mrow id="p1.1.m1.1.4" xref="p1.1.m1.1.4.cmml"><mi id="p1.1.m1.1.1" xref="p1.1.m1.1.1.cmml">a</mi><mo id="p1.1.m1.1.2" xref="p1.1.m1.1.2.cmml">+</mo><mi id="p1.1.m1.1.3" xref="p1.1.m1.1.3.cmml">b</mi></mrow><annotation-xml encoding="MathML-Content" id="p1.1.m1.1.cmml" xref="p1.1.m1.1"><apply id="p1.1.m1.1.4.cmml" xref="p1.1.m1.1.4"><plus id="p1.1.m1.1.2.cmml" xref="p1.1.m1.1.2"/><ci id="p1.1.m1.1.1.cmml" xref="p1.1.m1.1.1">a</ci><ci id="p1.1.m1.1.3.cmml" xref="p1.1.m1.1.3">b</ci></apply></annotation-xml><annotation encoding="application/x-tex" id="p1.1.m1.1b" xref="p1.1.m1.1.cmml">{\displaystyle a+b}</annotation></semantics></math>';
$expected = '<math xmlns="http://www.w3.org/1998/Math/MathML" id="p1.1.m1.1" class="ltx_Math" alttext="{\displaystyle a+b}" ><semantics id="p1.1.m1.1a"><mrow id="p1.1.m1.1.4" xref="p1.1.m1.1.4.cmml"><mi id="p1.1.m1.1.1" xref="p1.1.m1.1.1.cmml">a</mi><mo id="p1.1.m1.1.2" xref="p1.1.m1.1.2.cmml">+</mo><mi id="p1.1.m1.1.3" xref="p1.1.m1.1.3.cmml">b</mi></mrow><annotation-xml encoding="MathML-Content" id="p1.1.m1.1b"><apply id="p1.1.m1.1.4.cmml" xref="p1.1.m1.1.4"><plus id="p1.1.m1.1.2.cmml" xref="p1.1.m1.1.2"/><ci id="p1.1.m1.1.1.cmml" xref="p1.1.m1.1.1">a</ci><ci id="p1.1.m1.1.3.cmml" xref="p1.1.m1.1.3">b</ci></apply></annotation-xml><annotation encoding="application/x-tex" id="p1.1.m1.1c">{\displaystyle a+b}</annotation></semantics></math>';
$real = preg_replace( "/\n\s*/", '', $renderer->getHtmlOutput() );
$this->assertContains( $expected, $real
, "Rendering of a+b in plain Text mode." .