public function testConvert() { $data = (include __DIR__ . '/../../_files/indexer_config.php'); $dom = new \DOMDocument(); $dom->loadXML($data['inputXML']); $this->assertEquals($data['expected'], $this->_model->convert($dom)); }
public function testConvert() { $dom = new \DOMDocument(); $xmlFile = __DIR__ . '/_files/fieldset.xml'; $dom->loadXML(file_get_contents($xmlFile)); $convertedFile = __DIR__ . '/_files/fieldset_config.php'; $expectedResult = (include $convertedFile); $this->assertEquals($expectedResult, $this->_model->convert($dom)); }
/** * @param string $xmlData * @dataProvider wrongXmlDataProvider * @expectedException \Exception */ public function testMapThrowsExceptionWhenXmlHasWrongFormat($xmlData) { $dom = new \DOMDocument(); $dom->loadXML($xmlData); $this->_model->convert($dom); }