public function testGetSetLink() { $view = new View(); $link = $view->createLink(array('key1' => 'value1')); $this->assertEquals('<link key1="value1">', $link); $view->setDoctype(View::DOCTYPE_XHTML1_0_STRICT); $link = $view->createLink(array('key1' => 'value1')); $this->assertEquals('<link key1="value1"/>', $link); $view->setDoctype(View::DOCTYPE_HTML5); $view->setLink(array('key1' => 'value1')); $this->assertEquals('<link key1="value1">', $view->getLinks()); $view->setLink(array('key2' => 'value2')); $expected = "<link key1=\"value1\">\n<link key2=\"value2\">"; $this->assertEquals($expected, $view->getLinks()); }