aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/Notification/NotificationTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lib/Notification/NotificationTest.php')
-rw-r--r--tests/lib/Notification/NotificationTest.php28
1 files changed, 28 insertions, 0 deletions
diff --git a/tests/lib/Notification/NotificationTest.php b/tests/lib/Notification/NotificationTest.php
index 93d48dfd604..77d9e989cf1 100644
--- a/tests/lib/Notification/NotificationTest.php
+++ b/tests/lib/Notification/NotificationTest.php
@@ -386,6 +386,34 @@ class NotificationTest extends TestCase {
$this->notification->setLink($link);
}
+ public function dataSetIcon() {
+ return $this->dataValidString(4000);
+ }
+
+ /**
+ * @dataProvider dataSetIcon
+ * @param string $icon
+ */
+ public function testSetIcon($icon) {
+ $this->assertSame('', $this->notification->getIcon());
+ $this->assertSame($this->notification, $this->notification->setIcon($icon));
+ $this->assertSame($icon, $this->notification->getIcon());
+ }
+
+ public function dataSetIconInvalid() {
+ return $this->dataInvalidString(4000);
+ }
+
+ /**
+ * @dataProvider dataSetIconInvalid
+ * @param mixed $icon
+ *
+ * @expectedException \InvalidArgumentException
+ */
+ public function testSetIconInvalid($icon) {
+ $this->notification->setIcon($icon);
+ }
+
public function testCreateAction() {
$action = $this->notification->createAction();
$this->assertInstanceOf('OCP\Notification\IAction', $action);