public function testSearchIndex() { $item = new Item(); $item->setBody('<a>somEthäng</a>'); $item->setUrl('http://link'); $item->setAuthor('äuthor'); $item->setTitle('<a>tätle</a>'); $item->generateSearchIndex(); $expected = 'somethängäuthortätlehttp://link'; $this->assertEquals($expected, $item->getSearchIndex()); }
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()); }