public function testHtmlLinkInjectJavascript() { $this->setExpectedException('InvalidArgumentException', '$options should use valid attribute names as keys'); $res = new EasyRdf_Resource('http://example.com/'); $html = $res->htmlLink(null, array('onclick=alert(1) a' => 'b"')); }
public function testHtmlLinkWithEscaping() { $res = new EasyRdf_Resource('http://example.com/'); $this->assertSame('<a href="http://example.com/">=> Click Here <=</a>', $res->htmlLink('=> Click Here <=')); }