コード例 #1
0
 public function testgetLiternal()
 {
     $config = new WorkerConfig();
     $this->assertEquals('LaterJob\\Config\\WorkerConfig::STATE_START', $config->getLiteral(1));
     $this->assertEquals('LaterJob\\Config\\WorkerConfig::STATE_FINISH', $config->getLiteral(2));
     $this->assertEquals('LaterJob\\Config\\WorkerConfig::STATE_ERROR', $config->getLiteral(3));
 }
コード例 #2
0
ファイル: Worker.php プロジェクト: icomefromthenet/laterjob
 /**
  *  Return the name of the current state
  *
  *  @access public
  *  @return string the current state of worker
  */
 public function getState()
 {
     return $this->definition->getLiteral($this->current_state);
 }