/** * Test the parsing of the curriculum JSON. */ public function testCurriculumParsing() { $xml = file_get_contents(FIXTURES_DIR . '/curriculum-data/lp21_curriculum_obfuscated.xml'); // Parse the data. $data = LP21Curriculum::parseCurriculumXml($xml); // Load the expected ASCII tree. $expectedAsciiTree = file_get_contents(FIXTURES_DIR . '/curriculum-data/lp21_curriculum_obfuscated.ascii'); $this->assertEquals(trim($expectedAsciiTree), $data->curriculum->asciiDump(), "The ASCII representation of the curriculum tree is as expected."); }