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 68b7b5ab8..11620b33c 100644
--- a/tests/Unit/Db/ItemTest.php
+++ b/tests/Unit/Db/ItemTest.php
@@ -317,6 +317,18 @@ class ItemTest extends TestCase
$this->assertEquals($expected, $item->getSearchIndex());
}
+ public function testSearchIndexNull()
+ {
+ $item = new Item();
+ $item->setBody('<a>somEth&auml;ng</a>');
+ $item->setUrl('http://link');
+ $item->setAuthor(null);
+ $item->setTitle('<a>t&auml;tle</a>');
+ $item->setCategories(['food', 'travel']);
+ $item->generateSearchIndex();
+ $expected = 'somethängtätlefoodtravelhttp://link';
+ $this->assertEquals($expected, $item->getSearchIndex());
+ }
public function testFromImport()
{