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)); }
/** * 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); }