Example #1
0
 public function testMakeLinksInBodyOpenNewTab()
 {
     $item = new Item();
     $item->setBody("<a href=\"test\">ha</a>");
     $this->assertEquals("<a target=\"_blank\" rel=\"noreferrer\" href=\"test\">ha</a>", $item->getBody());
 }
Example #2
0
 public function testComputeFingerPrint()
 {
     $title = 'a';
     $body = 'b';
     $url = 'http://google.com';
     $link = 'ho';
     $item = new Item();
     $item->setBody($body);
     $item->setTitle($title);
     $item->setUrl($url);
     $item->setEnclosureLink($link);
     $item->generateSearchIndex();
     $this->assertEquals(md5($title . $url . $body . $link), $item->getFingerprint());
 }