parse(OC::$SERVERROOT . "/tests/data/app/$xmlFile"); $this->assertEquals($expectedData, $data); } /** * @dataProvider providesInfoXml */ public function testParsingValidXmlWithoutCache($expectedJson, $xmlFile): void { $this->parserTest($expectedJson, $xmlFile); } /** * @dataProvider providesInfoXml */ public function testParsingValidXmlWithCache($expectedJson, $xmlFile): void { $this->parserTest($expectedJson, $xmlFile, self::$cache); } public function providesInfoXml(): array { return [ ['expected-info.json', 'valid-info.xml'], [null, 'invalid-info.xml'], ['expected-info.json', 'valid-info.xml'], [null, 'invalid-info.xml'], ['navigation-one-item.json', 'navigation-one-item.xml'], ['navigation-two-items.json', 'navigation-two-items.xml'], ['various-single-item.json', 'various-single-item.xml'], ]; } }