/** * Tests that the task name can be found from a class name / object * * @test * @covers Minion_Task::convert_class_to_task * @dataProvider provider_convert_class_to_task * @param string Expected task name * @param mixed Input class */ public function test_convert_class_to_task($expected, $class) { $this->assertSame($expected, Minion_Task::convert_class_to_task($class)); }
/** * Outputs help for this task * * @return null */ protected function _help(array $params) { $tasks = $this->_compile_task_list(Kohana::list_files('classes/task')); $inspector = new ReflectionClass($this); list($description, $tags) = $this->_parse_doccomment($inspector->getDocComment()); $view = View::factory('minion/help/task')->set('description', $description)->set('tags', (array) $tags)->set('task', Minion_Task::convert_class_to_task($this)); echo $view; }