ctr, self::$SKIPPEDINDICES ) ) { MMLTestUtilHTML::generateHTMLtableRow( self::$GENERATEDHTMLFILE, [ $tc->ctr, $tc->tex, "skipped", "skipped", "skipped" ], false, self::$GENERATEHTML ); $this->assertTrue( true ); return; } # Fetch result from TexVC(PHP) $texVC->check( $tc->tex, [ 'debug' => false, 'usemathrm' => false, 'oldtexvc' => false, 'usemhchem' => true ] ); $mhchemParser = new MhchemParser( self::$LOGMHCHEM ); $mhchemOutput = $mhchemParser->toTex( $tc->tex, $tc->typeC ); MMLTestUtilHTML::generateHTMLtableRow( self::$GENERATEDHTMLFILE, [ $title, $tc->tex, $tc->texNew, $mhchemOutput ], false, self::$GENERATEHTML ); if ( !self::$SKIPXMLVALIDATION ) { $this->assertEquals( $tc->texNew, $mhchemOutput ); } else { $this->assertTrue( true ); } } public static function provideTestCases() { $fileTestcases = MMLTestUtil::getJSON( self::$FILENAMEREF ); $f = []; // Adding running indices for location of tests. $ctr = 0; foreach ( $fileTestcases as $tcF ) { $tc = [ "ctr" => $ctr, "tex" => $tcF->tex, "texNew" => $tcF->texNew, "type" => $tcF->type, "typeC" => $tcF->typeC, "mml_mathoid" => $tcF->mmlMathoid, "mml_latexml" => $tcF->mmlLaTeXML, ]; $f[] = [ "tc#" . str_pad( $ctr, 3, '0', STR_PAD_LEFT ) . " " . $tcF->description, (object)$tc ]; $ctr++; } // Filtering results by index if necessary if ( self::$APPLYFILTER ) { $f = array_slice( $f, self::$FILTERSTART, self::$FILTERLENGTH ); } return $f; } }