summaryrefslogtreecommitdiff
path: root/plugins/Timetrackingeditor/Test
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Timetrackingeditor/Test')
-rw-r--r--plugins/Timetrackingeditor/Test/PluginTest.php17
-rw-r--r--plugins/Timetrackingeditor/Test/TimetrackingeditorTest.php48
2 files changed, 65 insertions, 0 deletions
diff --git a/plugins/Timetrackingeditor/Test/PluginTest.php b/plugins/Timetrackingeditor/Test/PluginTest.php
new file mode 100644
index 00000000..e563e9e4
--- /dev/null
+++ b/plugins/Timetrackingeditor/Test/PluginTest.php
@@ -0,0 +1,17 @@
+<?php
+require_once 'tests/units/Base.php';
+use Kanboard\Plugin\Timetable\Plugin;
+class PluginTest extends Base
+{
+ public function testPlugin()
+ {
+ $plugin = new Plugin($this->container);
+ $this->assertSame(null, $plugin->initialize());
+ $this->assertSame(null, $plugin->onStartup());
+ $this->assertNotEmpty($plugin->getPluginName());
+ $this->assertNotEmpty($plugin->getPluginDescription());
+ $this->assertNotEmpty($plugin->getPluginAuthor());
+ $this->assertNotEmpty($plugin->getPluginVersion());
+ $this->assertNotEmpty($plugin->getPluginHomepage());
+ }
+}
diff --git a/plugins/Timetrackingeditor/Test/TimetrackingeditorTest.php b/plugins/Timetrackingeditor/Test/TimetrackingeditorTest.php
new file mode 100644
index 00000000..551d9b10
--- /dev/null
+++ b/plugins/Timetrackingeditor/Test/TimetrackingeditorTest.php
@@ -0,0 +1,48 @@
+
+<?php
+
+require_once 'tests/units/BaseProcedureTest.php';
+
+use Kanboard\Core\Plugin\Loader;
+use Kanboard\
+use Kanboard\Plugin\Timetrackingeditor\SubtasktimetrackingCreationModel;
+use Kanboard\Plugin\Timetrackingeditor\SubtasktimetrackingEditModel;
+
+class TimetrackingeditorTest extends BaseProcedureTest
+{
+ protected $projectName = 'My project to test time tracking';
+ protected $project_id;
+ protected $task_id;
+ protected $subtask_id;
+
+
+ public function setUp()
+ {
+ parent::setUp();
+
+ $plugin = new Load($this->container);
+ $plugin->scan();
+ }
+
+ public function testAll()
+ {
+ $this->assertCreateTeamProject();
+
+ $this->task_id = $this->app->createTask(array('project_id' => $this->projectId, 'title' => 'Task 1'));
+ $this->subtask_id = $this->app->createSubTask(array('project_id' => $this->projectId, 'task_id' => $this->task_id, 'title' => 'Subtask 1'));
+
+ $this->assertNotFalse($this->task_id);
+ $this->assertNotFalse($this->subtask_id);
+
+ $this->testCreateEntry();
+ }
+
+ public function testCreateEntry()
+ {
+
+
+
+ }
+
+
+}