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