Exemple #1
0
 public function testGet()
 {
     $xml = '<root><item>one</item><item>two</item><item>three</item></root>';
     $imago = new Value($xml);
     $imago = new XmlToDom($imago);
     $doc = $imago->get();
     $this->assertInstanceOf('DomDocument', $doc);
     $this->assertEquals(3, $doc->getElementsByTagName('item')->length);
     $this->assertEquals('root', $doc->documentElement->nodeName);
 }
Exemple #2
0
 public function __construct(Transformable $inner, array $args = [])
 {
     parent::__construct($inner, $args);
     $this->options()->setUnlessExists('encoding', 'UTF-8');
 }