public function testMarshall() { $img = new Img('my/image.png', "An Image...", "my-img"); $img->setClass('beautiful'); $img->setHeight('40%'); $img->setWidth(30); $img->setLang('en-YO'); $img->setLongdesc("A Long Description..."); $marshaller = $this->getMarshallerFactory()->createMarshaller($img); $element = $marshaller->marshall($img); $dom = new DOMDocument('1.0', 'UTF-8'); $element = $dom->importNode($element, true); $this->assertEquals('<img src="my/image.png" alt="An Image..." width="30" height="40%" longdesc="A Long Description..." id="my-img" class="beautiful" xml:lang="en-YO"/>', $dom->saveXML($element)); }