diff options
author | Bernhard Posselt <nukeawhale@gmail.com> | 2013-08-06 13:41:40 +0200 |
---|---|---|
committer | Bernhard Posselt <nukeawhale@gmail.com> | 2013-08-06 13:41:40 +0200 |
commit | 582dba7e944850d39316a15ef9e3297577fb936f (patch) | |
tree | 0d5a4dcd27202295327e49dd3ac17cf24dd423ba /tests | |
parent | 7f7dc6d86cbbaf251fb7c2dc3a46c94028d79eb6 (diff) |
strip all html tags from author and title, fix #287
Diffstat (limited to 'tests')
-rw-r--r-- | tests/unit/db/ItemTest.php | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/unit/db/ItemTest.php b/tests/unit/db/ItemTest.php index 6c1c5ea6c..d48c8da12 100644 --- a/tests/unit/db/ItemTest.php +++ b/tests/unit/db/ItemTest.php @@ -102,4 +102,21 @@ class ItemTest extends \PHPUnit_Framework_TestCase { ), $item->toAPI()); } + + public function testSetAuthor(){ + $item = new Item(); + $item->setAuthor('<a>my link</li>'); + $this->assertEquals('my link', $item->getAuthor()); + $this->assertContains('author', $item->getUpdatedFields()); + } + + + public function testSetTitle(){ + $item = new Item(); + $item->setTitle('<a>my link</li>'); + $this->assertEquals('my link', $item->getTitle()); + $this->assertContains('title', $item->getUpdatedFields()); + } + + }
\ No newline at end of file |