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..ec92eb4d9 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>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());
+ }
+
+
public function testFromImport() {
$item = $this->createImportItem(false);