From 82623f1a212a3a79507ede69586c561efa675224 Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Sun, 26 Jun 2016 15:47:02 -0400 Subject: Added API calls for subtask time tracking --- .../SubtaskTimeTrackingProcedureTest.php | 46 ++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 tests/integration/SubtaskTimeTrackingProcedureTest.php (limited to 'tests/integration/SubtaskTimeTrackingProcedureTest.php') diff --git a/tests/integration/SubtaskTimeTrackingProcedureTest.php b/tests/integration/SubtaskTimeTrackingProcedureTest.php new file mode 100644 index 00000000..6c45c983 --- /dev/null +++ b/tests/integration/SubtaskTimeTrackingProcedureTest.php @@ -0,0 +1,46 @@ +assertCreateTeamProject(); + $this->assertCreateTask(); + $this->assertCreateSubtask(); + $this->assertHasNoTimer(); + $this->assertStartTimer(); + $this->assertHasTimer(); + $this->assertStopTimer(); + $this->assertHasNoTimer(); + $this->assertGetSubtaskTimeSpent(); + } + + public function assertHasNoTimer() + { + $this->assertFalse($this->app->hasSubtaskTimer($this->subtaskId, $this->userUserId)); + } + + public function assertHasTimer() + { + $this->assertTrue($this->app->hasSubtaskTimer($this->subtaskId, $this->userUserId)); + } + + public function assertStartTimer() + { + $this->assertTrue($this->app->setSubtaskStartTime($this->subtaskId, $this->userUserId)); + } + + public function assertStopTimer() + { + $this->assertTrue($this->app->setSubtaskEndTime($this->subtaskId, $this->userUserId)); + } + + public function assertGetSubtaskTimeSpent() + { + $this->assertEquals(0, $this->app->getSubtaskTimeSpent($this->subtaskId, $this->userUserId)); + } +} -- cgit v1.2.3