Ejemplo n.º 1
0
 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/">=&gt; Click Here &lt;=</a>', $res->htmlLink('=> Click Here <='));
 }