Exemplo n.º 1
0
 /**
  * Gets the task name for the task
  *
  * @return string
  */
 public function __toString()
 {
     static $task_name = NULL;
     if ($task_name === NULL) {
         $task_name = Minion_Util::convert_class_to_task($this);
     }
     return $task_name;
 }
Exemplo n.º 2
0
 /**
  * Tests that the task name can be found from a class name / object
  *
  * @test
  * @covers Minion_Util::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_Util::convert_class_to_task($class));
 }