summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/units/Action/TaskAssignCategoryLinkTest.php6
-rw-r--r--tests/units/Action/TaskAssignColorLinkTest.php4
-rw-r--r--tests/units/EventBuilder/CommentEventBuilderTest.php4
-rw-r--r--tests/units/EventBuilder/ProjectFileEventBuilderTest.php4
-rw-r--r--tests/units/EventBuilder/SubtaskEventBuilderTest.php6
-rw-r--r--tests/units/EventBuilder/TaskEventBuilderTest.php10
-rw-r--r--tests/units/EventBuilder/TaskFileEventBuilderTest.php4
-rw-r--r--tests/units/EventBuilder/TaskLinkEventBuilderTest.php6
8 files changed, 22 insertions, 22 deletions
diff --git a/tests/units/Action/TaskAssignCategoryLinkTest.php b/tests/units/Action/TaskAssignCategoryLinkTest.php
index b9d7e9d9..1576f81b 100644
--- a/tests/units/Action/TaskAssignCategoryLinkTest.php
+++ b/tests/units/Action/TaskAssignCategoryLinkTest.php
@@ -33,7 +33,7 @@ class TaskAssignCategoryLinkTest extends Base
$event = TaskLinkEventBuilder::getInstance($this->container)
->withTaskLinkId(1)
- ->build();
+ ->buildEvent();
$this->assertTrue($action->execute($event, TaskLinkModel::EVENT_CREATE_UPDATE));
@@ -62,7 +62,7 @@ class TaskAssignCategoryLinkTest extends Base
$event = TaskLinkEventBuilder::getInstance($this->container)
->withTaskLinkId(1)
- ->build();
+ ->buildEvent();
$this->assertFalse($action->execute($event, TaskLinkModel::EVENT_CREATE_UPDATE));
@@ -91,7 +91,7 @@ class TaskAssignCategoryLinkTest extends Base
$event = TaskLinkEventBuilder::getInstance($this->container)
->withTaskLinkId(1)
- ->build();
+ ->buildEvent();
$this->assertFalse($action->execute($event, TaskLinkModel::EVENT_CREATE_UPDATE));
diff --git a/tests/units/Action/TaskAssignColorLinkTest.php b/tests/units/Action/TaskAssignColorLinkTest.php
index 27364bc9..77a6c90e 100644
--- a/tests/units/Action/TaskAssignColorLinkTest.php
+++ b/tests/units/Action/TaskAssignColorLinkTest.php
@@ -30,7 +30,7 @@ class TaskAssignColorLinkTest extends Base
$event = TaskLinkEventBuilder::getInstance($this->container)
->withTaskLinkId(1)
- ->build();
+ ->buildEvent();
$this->assertTrue($action->execute($event, TaskLinkModel::EVENT_CREATE_UPDATE));
@@ -57,7 +57,7 @@ class TaskAssignColorLinkTest extends Base
$event = TaskLinkEventBuilder::getInstance($this->container)
->withTaskLinkId(1)
- ->build();
+ ->buildEvent();
$this->assertFalse($action->execute($event, TaskLinkModel::EVENT_CREATE_UPDATE));
diff --git a/tests/units/EventBuilder/CommentEventBuilderTest.php b/tests/units/EventBuilder/CommentEventBuilderTest.php
index a490799e..2f6a90b5 100644
--- a/tests/units/EventBuilder/CommentEventBuilderTest.php
+++ b/tests/units/EventBuilder/CommentEventBuilderTest.php
@@ -13,7 +13,7 @@ class CommentEventBuilderTest extends Base
{
$commentEventBuilder = new CommentEventBuilder($this->container);
$commentEventBuilder->withCommentId(42);
- $this->assertNull($commentEventBuilder->build());
+ $this->assertNull($commentEventBuilder->buildEvent());
}
public function testBuild()
@@ -28,7 +28,7 @@ class CommentEventBuilderTest extends Base
$this->assertEquals(1, $commentModel->create(array('task_id' => 1, 'comment' => 'bla bla', 'user_id' => 1)));
$commentEventBuilder->withCommentId(1);
- $event = $commentEventBuilder->build();
+ $event = $commentEventBuilder->buildEvent();
$this->assertInstanceOf('Kanboard\Event\CommentEvent', $event);
$this->assertNotEmpty($event['comment']);
diff --git a/tests/units/EventBuilder/ProjectFileEventBuilderTest.php b/tests/units/EventBuilder/ProjectFileEventBuilderTest.php
index bfe22719..8f5eb87e 100644
--- a/tests/units/EventBuilder/ProjectFileEventBuilderTest.php
+++ b/tests/units/EventBuilder/ProjectFileEventBuilderTest.php
@@ -12,7 +12,7 @@ class ProjectFileEventBuilderTest extends Base
{
$projectFileEventBuilder = new ProjectFileEventBuilder($this->container);
$projectFileEventBuilder->withFileId(42);
- $this->assertNull($projectFileEventBuilder->build());
+ $this->assertNull($projectFileEventBuilder->buildEvent());
}
public function testBuild()
@@ -24,7 +24,7 @@ class ProjectFileEventBuilderTest extends Base
$this->assertEquals(1, $projectModel->create(array('name' => 'test1')));
$this->assertEquals(1, $projectFileModel->create(1, 'Test', '/tmp/test', 123));
- $event = $projectFileEventBuilder->withFileId(1)->build();
+ $event = $projectFileEventBuilder->withFileId(1)->buildEvent();
$this->assertInstanceOf('Kanboard\Event\ProjectFileEvent', $event);
$this->assertNotEmpty($event['file']);
diff --git a/tests/units/EventBuilder/SubtaskEventBuilderTest.php b/tests/units/EventBuilder/SubtaskEventBuilderTest.php
index 062bdfb4..fe425cb8 100644
--- a/tests/units/EventBuilder/SubtaskEventBuilderTest.php
+++ b/tests/units/EventBuilder/SubtaskEventBuilderTest.php
@@ -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']);
diff --git a/tests/units/EventBuilder/TaskEventBuilderTest.php b/tests/units/EventBuilder/TaskEventBuilderTest.php
index e6334fe2..c89dcd85 100644
--- a/tests/units/EventBuilder/TaskEventBuilderTest.php
+++ b/tests/units/EventBuilder/TaskEventBuilderTest.php
@@ -12,7 +12,7 @@ class TaskEventBuilderTest extends Base
{
$taskEventBuilder = new TaskEventBuilder($this->container);
$taskEventBuilder->withTaskId(42);
- $this->assertNull($taskEventBuilder->build());
+ $this->assertNull($taskEventBuilder->buildEvent());
}
public function testBuildWithTask()
@@ -28,7 +28,7 @@ class TaskEventBuilderTest extends Base
->withTaskId(1)
->withTask(array('title' => 'before'))
->withChanges(array('title' => 'after'))
- ->build();
+ ->buildEvent();
$this->assertInstanceOf('Kanboard\Event\TaskEvent', $event);
$this->assertNotEmpty($event['task']);
@@ -45,7 +45,7 @@ class TaskEventBuilderTest extends Base
$this->assertEquals(1, $projectModel->create(array('name' => 'test1')));
$this->assertEquals(1, $taskCreationModel->create(array('title' => 'test', 'project_id' => 1)));
- $event = $taskEventBuilder->withTaskId(1)->build();
+ $event = $taskEventBuilder->withTaskId(1)->buildEvent();
$this->assertInstanceOf('Kanboard\Event\TaskEvent', $event);
$this->assertNotEmpty($event['task']);
@@ -65,7 +65,7 @@ class TaskEventBuilderTest extends Base
$event = $taskEventBuilder
->withTaskId(1)
->withChanges(array('title' => 'new title'))
- ->build();
+ ->buildEvent();
$this->assertInstanceOf('Kanboard\Event\TaskEvent', $event);
$this->assertNotEmpty($event['task']);
@@ -86,7 +86,7 @@ class TaskEventBuilderTest extends Base
->withTaskId(1)
->withChanges(array('title' => 'new title', 'project_id' => 1))
->withValues(array('key' => 'value'))
- ->build();
+ ->buildEvent();
$this->assertInstanceOf('Kanboard\Event\TaskEvent', $event);
$this->assertNotEmpty($event['task']);
diff --git a/tests/units/EventBuilder/TaskFileEventBuilderTest.php b/tests/units/EventBuilder/TaskFileEventBuilderTest.php
index c253b913..c90e18d3 100644
--- a/tests/units/EventBuilder/TaskFileEventBuilderTest.php
+++ b/tests/units/EventBuilder/TaskFileEventBuilderTest.php
@@ -13,7 +13,7 @@ class TaskFileEventBuilderTest extends Base
{
$taskFileEventBuilder = new TaskFileEventBuilder($this->container);
$taskFileEventBuilder->withFileId(42);
- $this->assertNull($taskFileEventBuilder->build());
+ $this->assertNull($taskFileEventBuilder->buildEvent());
}
public function testBuild()
@@ -27,7 +27,7 @@ class TaskFileEventBuilderTest extends Base
$this->assertEquals(1, $taskCreationModel->create(array('title' => 'test', 'project_id' => 1)));
$this->assertEquals(1, $taskFileModel->create(1, 'Test', '/tmp/test', 123));
- $event = $taskFileEventBuilder->withFileId(1)->build();
+ $event = $taskFileEventBuilder->withFileId(1)->buildEvent();
$this->assertInstanceOf('Kanboard\Event\TaskFileEvent', $event);
$this->assertNotEmpty($event['file']);
diff --git a/tests/units/EventBuilder/TaskLinkEventBuilderTest.php b/tests/units/EventBuilder/TaskLinkEventBuilderTest.php
index 7364d651..18508146 100644
--- a/tests/units/EventBuilder/TaskLinkEventBuilderTest.php
+++ b/tests/units/EventBuilder/TaskLinkEventBuilderTest.php
@@ -13,7 +13,7 @@ class TaskLinkEventBuilderTest extends Base
{
$taskLinkEventBuilder = new TaskLinkEventBuilder($this->container);
$taskLinkEventBuilder->withTaskLinkId(42);
- $this->assertNull($taskLinkEventBuilder->build());
+ $this->assertNull($taskLinkEventBuilder->buildEvent());
}
public function testBuild()
@@ -28,7 +28,7 @@ class TaskLinkEventBuilderTest extends Base
$this->assertEquals(2, $taskCreationModel->create(array('title' => 'task 2', 'project_id' => 1)));
$this->assertEquals(1, $taskLinkModel->create(1, 2, 1));
- $event = $taskLinkEventBuilder->withTaskLinkId(1)->build();
+ $event = $taskLinkEventBuilder->withTaskLinkId(1)->buildEvent();
$this->assertInstanceOf('Kanboard\Event\TaskLinkEvent', $event);
$this->assertNotEmpty($event['task_link']);
@@ -47,7 +47,7 @@ class TaskLinkEventBuilderTest extends Base
$this->assertEquals(2, $taskCreationModel->create(array('title' => 'task 2', 'project_id' => 1)));
$this->assertEquals(1, $taskLinkModel->create(1, 2, 1));
- $eventData = $taskLinkEventBuilder->withTaskLinkId(1)->build();
+ $eventData = $taskLinkEventBuilder->withTaskLinkId(1)->buildEvent();
$title = $taskLinkEventBuilder->buildTitleWithAuthor('Foobar', TaskLinkModel::EVENT_CREATE_UPDATE, $eventData->getAll());
$this->assertEquals('Foobar set a new internal link for the task #1', $title);