skipped == true || in_array( $tc->ctr, self::$SKIPPEDINDICES, true ) ) { $this->assertTrue( true ); return; } # Fetch result from TexVC(PHP) $resultT = $texVC->check( $tc->latexi, [ 'debug' => false, 'usemathrm' => $tc->usemathrm ?? false, "useintent" => true, "usemhchem" => $tc->usemhchem, 'oldtexvc' => $tc->oldtexvc ?? false ] ); if ( !isset( $resultT["input"] ) ) { if ( $tc->shouldfail ) { $this->assertTrue( true ); return; } } $mathMLtexVC = MMLTestUtil::getMMLwrapped( $resultT["input"] ); $writeObj = [ "id" => $tc->id, "latex" => $tc->latex, "latexi" => $tc->latexi, "MathML_texvc" => $mathMLtexVC, "MathML_default" => $tc->mathML_default, "MathML_explicit" => $tc->mathML_explicit, "Name" => $tc->name, ]; self::writeToJSONFile( $writeObj, $tc->ctr != 86 ? true : false ); $this->assertTrue( true ); } public static function provideTestCases() { $resIntent = MMLTestUtil::getJSON( self::$FILENAMEINTENTTESTS ); $resIntent2 = MMLTestUtil::getJSON( self::$FILENAMEINTENTANNOTATED ); $f = []; // Adding running indices for location of tests. foreach ( $resIntent as $index => $tcIntent ) { $tcIntent->ctr = $index; $tcIntent2 = $resIntent2[$index]; $tcIntent->latexi = isset( $tcIntent2->latexi ) ? $tcIntent2->latexi : ""; $tcIntent->shouldfail = isset( $tcIntent2->shouldfail ) ? $tcIntent2->shouldfail : false; $tcIntent->skipped = isset( $tcIntent2->skipped ) ? $tcIntent2->skipped : false; $tcIntent->usemhchem = isset( $tcIntent2->usemhchem ) ? $tcIntent2->usemhchem : false; array_push( $f, [ $tcIntent->name, (object)$tcIntent ] ); } // Filtering results by index if necessary if ( self::$APPLYFILTER ) { $f = array_slice( $f, self::$FILTERSTART, self::$FILTERLENGTH ); } return $f; } }