コード例 #1
0
ファイル: YamlParserTest.php プロジェクト: hilmysyarif/sic
 public function testtoArrayReturnsArrayRepresenationOfYamlObject()
 {
     $expected = ['foo' => 'bar'];
     $parser = new XmlParser('<xml><foo>bar</foo></xml>');
     $x = new YamlParser($parser->toYaml());
     $this->assertEquals($expected, $x->toArray());
 }
コード例 #2
0
ファイル: XmlParserTest.php プロジェクト: hilmysyarif/sic
 public function testtoJsonReturnsJsonRepresentationOfXmlObject()
 {
     $expected = '{"foo":"bar"}';
     $parser = new XmlParser('<xml><foo>bar</foo></xml>');
     $this->assertEquals($expected, $parser->toJson());
 }