/**
  * Converts a data model into a message.
  *
  * @param  R3H6\JobqueueDatabase\Domain\Model\Job $job
  * @return Message
  */
 private function decodeJob(DatabaseJob $job)
 {
     $message = new Message($job->getPayload(), $job->getUid());
     $message->setState($job->getState());
     $message->setAttemps($job->getAttemps());
     return $message;
 }
Пример #2
0
 /**
  * @test
  */
 public function getStateReturnsInitialValueForInteger()
 {
     $this->assertSame(0, $this->subject->getState());
 }