assert_equal_xml($xml, $expected); }); it('should be an UTF-8 XML-1.0 document with a stylesheet and a root element', function () use($stylesheet) { $xml = new FluidXml(['stylesheet' => 'http://servo-php.org/fluidxml']); $expected = $stylesheet . "\n" . "<doc/>"; assert_equal_xml($xml, $expected); }); it('should be an UTF-8 XML-1.0 document with a stylesheet and no root element', function () use($stylesheet) { $xml = new FluidXml(['root' => null, 'stylesheet' => 'http://servo-php.org/fluidxml']); $expected = $stylesheet; assert_equal_xml($xml, $expected); }); it('should throw invoking not existing method', function () { $xml = new FluidXml(); try { $xml->qquery(); } catch (\Exception $e) { $actual = $e; } assert_is_a($actual, \Exception::class); }); }); describe('.dom', function () { it('should return the associated DOMDocument instace', function () { $xml = new FluidXml(); $actual = $xml->dom(); assert_is_a($actual, \DOMDocument::class); }); }); describe('.namespace', function () { it('should be fluid', function () {