summaryrefslogtreecommitdiff
path: root/tests/units
diff options
context:
space:
mode:
authorFrédéric Guillot <fred@kanboard.net>2018-06-01 16:35:45 -0700
committerFrédéric Guillot <fred@kanboard.net>2018-06-01 16:35:45 -0700
commita0c44d238a6d09a6025fd38b42efff2343e9fc48 (patch)
treeea9d760db3f23fee4b371e98952c9fe12a71644c /tests/units
parent912cf378d730b3df8d285ba765711d9c456bdea0 (diff)
Make sure automatic actions are applied to all tasks when using bulk operations
Diffstat (limited to 'tests/units')
-rw-r--r--tests/units/Action/BaseActionTest.php14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/units/Action/BaseActionTest.php b/tests/units/Action/BaseActionTest.php
index feeba3f9..50c68fb5 100644
--- a/tests/units/Action/BaseActionTest.php
+++ b/tests/units/Action/BaseActionTest.php
@@ -141,4 +141,18 @@ class BaseActionTest extends Base
$this->assertTrue($dummyAction->execute($event, 'foobar'));
$this->assertFalse($dummyAction->execute($event, 'foobar'));
}
+
+ public function testExecuteSameActionSeveralTimesWithDifferentEvents()
+ {
+ $dummyAction = new DummyAction($this->container);
+ $dummyAction->setProjectId(1234);
+ $dummyAction->setParam('p1', 'something');
+ $dummyAction->addEvent('foobar', 'FooBar');
+
+ $event1 = new GenericEvent(array('project_id' => 1234, 'p1' => 'something', 'p2' => 'abc', 'p3' => array('p4' => 'a')));
+ $event2 = new GenericEvent(array('project_id' => 1234, 'p1' => 'something', 'p2' => 'abc', 'p3' => array('p4' => 'b')));
+
+ $this->assertTrue($dummyAction->execute($event1, 'foobar'));
+ $this->assertTrue($dummyAction->execute($event2, 'foobar'));
+ }
}