public function testtoArrayReturnsArrayRepresenationOfYamlObject() { $expected = ['foo' => 'bar']; $parser = new XmlParser('<xml><foo>bar</foo></xml>'); $x = new YamlParser($parser->toYaml()); $this->assertEquals($expected, $x->toArray()); }
public function testtoJsonReturnsJsonRepresentationOfXmlObject() { $expected = '{"foo":"bar"}'; $parser = new XmlParser('<xml><foo>bar</foo></xml>'); $this->assertEquals($expected, $parser->toJson()); }