public function testXMLParse() { $event = new EventDispatcher(); $file = new File(); $file->fopen('example.xml'); $options = new ParseOptions(); $parser = new XMLParser($event); $parser->register(); $parser->parse($file, $options); $this->assertTrue(true); }
public function testXMLParseTwoFiles() { $event = new EventDispatcher(); $file = new File(); $file->fopen('example.yaml'); $options = new ParseOptions(); $parser = new YAMLParser($event); $this->assertTrue(count($parser->parse($file, $options)) > 0); $file = new File(); $file->fopen('example.yaml'); $this->assertTrue(count($parser->parse($file, $options)) > 0); //var_dump($parser->parse($file,$options)); }
public function testXMLParseTwoFiles() { $event = new EventDispatcher(); $file = new File(); $file->fopen('example.xml'); $options = new ParseOptions(); $parser = new XMLParser($event); $this->assertInstanceOf('\\SimpleXMLElement', $parser->parse($file, $options)); $file = new File(); $file->fopen('example.xml'); $this->assertInstanceOf('\\SimpleXMLElement', $parser->parse($file, $options)); //var_dump($parser->parse($file,$options)); }
/** * @expectedException \Faker\Parser\Exception\CantOpenFile */ public function testOpenBadFile() { $file = new File(); $file->fopen('bad_file.xml'); }