public function testCountByProject() { $tc = new TaskCreation($this->container); $tf = new TaskFinder($this->container); $p = new Project($this->container); $this->assertEquals(1, $p->create(array('name' => 'Project #1'))); $this->assertEquals(2, $p->create(array('name' => 'Project #2'))); $this->assertEquals(1, $tc->create(array('title' => 'Task #1', 'project_id' => 1))); $this->assertEquals(2, $tc->create(array('title' => 'Task #2', 'project_id' => 2))); $this->assertEquals(3, $tc->create(array('title' => 'Task #3', 'project_id' => 2))); $this->assertEquals(1, $tf->countByProjectId(1)); $this->assertEquals(2, $tf->countByProjectId(2)); }