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