summaryrefslogtreecommitdiffstats
path: root/tests/unit/db/ItemTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unit/db/ItemTest.php')
-rw-r--r--tests/unit/db/ItemTest.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/unit/db/ItemTest.php b/tests/unit/db/ItemTest.php
index c937053d1..719e8d5da 100644
--- a/tests/unit/db/ItemTest.php
+++ b/tests/unit/db/ItemTest.php
@@ -186,6 +186,18 @@ class ItemTest extends \PHPUnit_Framework_TestCase {
}
+ public function testSearchIndex() {
+ $item = new Item();
+ $item->setBody('<a>somEthing</a>');
+ $item->setUrl('http://link');
+ $item->setAuthor('author');
+ $item->setTitle('<a>title</a>');
+ $item->generateSearchIndex();
+ $expected = 'somethingauthortitlehttp://link';
+ $this->assertEquals($expected, $item->getSearchIndex());
+ }
+
+
public function testFromImport() {
$item = $this->createImportItem(false);