diff options
author | Joas Schilling <nickvergessen@owncloud.com> | 2015-09-03 14:47:49 +0200 |
---|---|---|
committer | Joas Schilling <nickvergessen@owncloud.com> | 2015-09-08 09:01:02 +0200 |
commit | c6469be8bdb70a57da5212f7b1e8e4836e0bb2be (patch) | |
tree | a4fe8555030fbfa2c68d8cdf53c6f33ed76aa93e /lib | |
parent | acf8149f17fb940c9c9ce1519869a1de34ef6a84 (diff) | |
download | nextcloud-server-c6469be8bdb70a57da5212f7b1e8e4836e0bb2be.tar.gz nextcloud-server-c6469be8bdb70a57da5212f7b1e8e4836e0bb2be.zip |
Add tests for notification
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/notification/notification.php | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/private/notification/notification.php b/lib/private/notification/notification.php index 5151b5546a8..2f53a347283 100644 --- a/lib/private/notification/notification.php +++ b/lib/private/notification/notification.php @@ -120,7 +120,7 @@ class Notification implements INotification { * @since 8.2.0 */ public function setUser($user) { - if (!is_string($user) || $user === '' || isset($app[64])) { + if (!is_string($user) || $user === '' || isset($user[64])) { throw new \InvalidArgumentException('The given user id is invalid'); } $this->user = $user; @@ -413,7 +413,7 @@ class Notification implements INotification { return $this->isValidCommon() && - $this->subject !== '' + $this->getSubject() !== '' ; } @@ -425,7 +425,7 @@ class Notification implements INotification { return $this->isValidCommon() && - $this->subjectParsed !== '' + $this->getParsedSubject() !== '' ; } @@ -434,15 +434,15 @@ class Notification implements INotification { */ protected function isValidCommon() { return - $this->app !== '' + $this->getApp() !== '' && - $this->user !== '' + $this->getUser() !== '' && - $this->timestamp !== 0 + $this->getTimestamp() !== 0 && - $this->objectType !== '' + $this->getObjectType() !== '' && - $this->objectId !== 0 + $this->getObjectId() !== 0 ; } } |