From 582dba7e944850d39316a15ef9e3297577fb936f Mon Sep 17 00:00:00 2001 From: Bernhard Posselt Date: Tue, 6 Aug 2013 13:41:40 +0200 Subject: strip all html tags from author and title, fix #287 --- tests/unit/db/ItemTest.php | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'tests') 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('my link'); + $this->assertEquals('my link', $item->getAuthor()); + $this->assertContains('author', $item->getUpdatedFields()); + } + + + public function testSetTitle(){ + $item = new Item(); + $item->setTitle('my link'); + $this->assertEquals('my link', $item->getTitle()); + $this->assertContains('title', $item->getUpdatedFields()); + } + + } \ No newline at end of file -- cgit v1.2.3