Esempio n. 1
0
 /**
  * Gets a unique id for this job
  * @return string
  */
 public function getId()
 {
     if ($this->id) {
         return $this->id;
     }
     $id = serialize($this->callback->__toString());
     $id .= serialize($this->minute);
     $id .= serialize($this->hour);
     $id .= serialize($this->day);
     $id .= serialize($this->month);
     $id .= serialize($this->dayOfWeek);
     $this->id = md5($id);
     return $this->id;
 }
Esempio n. 2
0
 /**
  * @dataProvider providerConstruct
  */
 public function testConstruct($expected, $callback)
 {
     $callback = new Callback($callback);
     $result = $callback->__toString();
     $this->assertEquals($expected, $result);
 }