diff options
author | Benjamin Brahmer <info@b-brahmer.de> | 2022-08-06 14:02:29 +0200 |
---|---|---|
committer | Benjamin Brahmer <info@b-brahmer.de> | 2022-08-06 14:02:29 +0200 |
commit | 55b33d962052c9efb6f267a7dfa64e31252bd929 (patch) | |
tree | da741e591915d6bbf67fea4c2450c9e1b39a0efa | |
parent | 16a8e6f2ba55cc470996e223a1d437f16b890162 (diff) |
Add null test
Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
-rw-r--r-- | tests/Unit/Db/ItemTest.php | 12 |
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äng</a>'); + $item->setUrl('http://link'); + $item->setAuthor(null); + $item->setTitle('<a>tätle</a>'); + $item->setCategories(['food', 'travel']); + $item->generateSearchIndex(); + $expected = 'somethängtätlefoodtravelhttp://link'; + $this->assertEquals($expected, $item->getSearchIndex()); + } public function testFromImport() { |