public function testSetActions() { $test = new Action('test'); $attempt = new Action('attempt'); $department = new Department($this->unusedDepartment); $department->setActions([$test->getId(), $attempt->getId()]); $actions = $department->getActions(); $this->assertEquals(2, count($actions)); $this->assertTrue(in_array($test->getId(), array_keys($actions))); $this->assertTrue(in_array($attempt->getId(), array_keys($actions))); $department->setActions([]); $actions = $department->getActions(); $this->assertEquals(0, count($actions)); }