Move events handling to Symfony\EventDispatcher

This commit is contained in:
Frédéric Guillot
2014-12-27 19:10:38 -05:00
parent cf821e117c
commit 17dc5bdc9e
75 changed files with 1076 additions and 1167 deletions

View File

@@ -2,6 +2,7 @@
require_once __DIR__.'/Base.php';
use Event\GenericEvent;
use Model\Task;
use Model\TaskCreation;
use Model\TaskFinder;
@@ -21,7 +22,7 @@ class ActionTaskMoveAnotherProject extends Base
);
$this->assertFalse($action->isExecutable($event));
$this->assertFalse($action->execute($event));
$this->assertFalse($action->execute(new GenericEvent($event)));
}
public function testBadColumn()
@@ -35,7 +36,7 @@ class ActionTaskMoveAnotherProject extends Base
'column_id' => 3,
);
$this->assertFalse($action->execute($event));
$this->assertFalse($action->execute(new GenericEvent($event)));
}
public function testExecute()
@@ -60,7 +61,7 @@ class ActionTaskMoveAnotherProject extends Base
// Our event should NOT be executed because we define the same project
$action->setParam('column_id', 2);
$action->setParam('project_id', 1);
$this->assertFalse($action->execute($event));
$this->assertFalse($action->execute(new GenericEvent($event)));
// Our task should be assigned to the project 1
$task = $tf->getById(1);
@@ -77,7 +78,7 @@ class ActionTaskMoveAnotherProject extends Base
// Our event should be executed because we define a different project
$action->setParam('column_id', 2);
$action->setParam('project_id', 2);
$this->assertTrue($action->execute($event));
$this->assertTrue($action->execute(new GenericEvent($event)));
// Our task should be assigned to the project 2
$task = $tf->getById(1);