summaryrefslogtreecommitdiffstats
path: root/lib/private/activitymanager.php
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@owncloud.com>2015-08-20 10:25:49 +0200
committerJoas Schilling <nickvergessen@owncloud.com>2015-08-20 10:25:49 +0200
commit389a32e92ad6a5556194ed78d1b63c4c67037c63 (patch)
treefb0527201d4008801ef1ac2b7589c6855a243ba4 /lib/private/activitymanager.php
parent4314c8fc6f5560323e3c811cf2ce40f22d718211 (diff)
downloadnextcloud-server-389a32e92ad6a5556194ed78d1b63c4c67037c63.tar.gz
nextcloud-server-389a32e92ad6a5556194ed78d1b63c4c67037c63.zip
Add test coverage for Activity Event and Manager
Diffstat (limited to 'lib/private/activitymanager.php')
-rw-r--r--lib/private/activitymanager.php12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/private/activitymanager.php b/lib/private/activitymanager.php
index 8360ccdaefa..0e4d359959e 100644
--- a/lib/private/activitymanager.php
+++ b/lib/private/activitymanager.php
@@ -142,16 +142,16 @@ class ActivityManager implements IManager {
*/
public function publish(IEvent $event) {
if (!$event->getApp()) {
- throw new \BadMethodCallException('App not set', 1);
+ throw new \BadMethodCallException('App not set', 10);
}
if (!$event->getType()) {
- throw new \BadMethodCallException('Type not set', 2);
- }
- if ($event->getSubject() === null || $event->getSubjectParameters() === null) {
- throw new \BadMethodCallException('Subject not set', 3);
+ throw new \BadMethodCallException('Type not set', 11);
}
if ($event->getAffectedUser() === null) {
- throw new \BadMethodCallException('Affected user not set', 4);
+ throw new \BadMethodCallException('Affected user not set', 12);
+ }
+ if ($event->getSubject() === null || $event->getSubjectParameters() === null) {
+ throw new \BadMethodCallException('Subject not set', 13);
}
if ($event->getAuthor() === null) {