diff options
author | Bernhard Posselt <dev@bernhard-posselt.com> | 2015-03-20 14:41:31 +0100 |
---|---|---|
committer | Bernhard Posselt <dev@bernhard-posselt.com> | 2015-03-21 13:36:50 +0100 |
commit | 953b030e2678ce45d2f182c181ef2190f39d161d (patch) | |
tree | 0337988efca9bf3b714ca9af5e95e188d6ddb260 /tests/unit/db/ItemTest.php | |
parent | 03ce3af3a51f51852cd0a3f06872fc36d7f62dfb (diff) |
generate an index
Diffstat (limited to 'tests/unit/db/ItemTest.php')
-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 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); |