From 710f2c7bb046b43ec9878ae795a181101f6d7515 Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Sat, 5 Sep 2015 23:30:56 -0400 Subject: Improve unit tests --- tests/units/Model/TaskTest.php | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 tests/units/Model/TaskTest.php (limited to 'tests/units/Model/TaskTest.php') diff --git a/tests/units/Model/TaskTest.php b/tests/units/Model/TaskTest.php new file mode 100644 index 00000000..ebafa612 --- /dev/null +++ b/tests/units/Model/TaskTest.php @@ -0,0 +1,29 @@ +container); + $tc = new TaskCreation($this->container); + $tf = new TaskFinder($this->container); + $p = new Project($this->container); + + $this->assertEquals(1, $p->create(array('name' => 'UnitTest'))); + $this->assertEquals(1, $tc->create(array('title' => 'Task #1', 'project_id' => 1))); + + $this->assertTrue($t->remove(1)); + $this->assertFalse($t->remove(1234)); + } +} -- cgit v1.2.3