NotificationModel refactoring

This commit is contained in:
Frederic Guillot
2016-07-23 14:50:59 -04:00
parent b6119e7dee
commit a823cc1d08
49 changed files with 494 additions and 232 deletions

View File

@@ -13,7 +13,7 @@ class SubtaskEventBuilderTest extends Base
{
$subtaskEventBuilder = new SubtaskEventBuilder($this->container);
$subtaskEventBuilder->withSubtaskId(42);
$this->assertNull($subtaskEventBuilder->build());
$this->assertNull($subtaskEventBuilder->buildEvent());
}
public function testBuildWithoutChanges()
@@ -27,7 +27,7 @@ class SubtaskEventBuilderTest extends Base
$this->assertEquals(1, $taskCreationModel->create(array('title' => 'test', 'project_id' => 1)));
$this->assertEquals(1, $subtaskModel->create(array('task_id' => 1, 'title' => 'test')));
$event = $subtaskEventBuilder->withSubtaskId(1)->build();
$event = $subtaskEventBuilder->withSubtaskId(1)->buildEvent();
$this->assertInstanceOf('Kanboard\Event\SubtaskEvent', $event);
$this->assertNotEmpty($event['subtask']);
@@ -49,7 +49,7 @@ class SubtaskEventBuilderTest extends Base
$event = $subtaskEventBuilder
->withSubtaskId(1)
->withValues(array('title' => 'new title', 'user_id' => 1))
->build();
->buildEvent();
$this->assertInstanceOf('Kanboard\Event\SubtaskEvent', $event);
$this->assertNotEmpty($event['subtask']);