Ejemplo n.º 1
0
 public function publish(DateRange $publication)
 {
     $this->state = $this->state->publish();
     $this->recordThat(new Events\PostWasPublished($this->getId(), $publication->getStart(), $publication->getEnd()));
 }
Ejemplo n.º 2
0
 /**
  * @expectedException PHPUnit_Framework_Exception
  */
 public function test_change_start_does_not_allow_null_date()
 {
     $Pub = new DateRange(new \DateTimeImmutable(), new \DateTimeImmutable('+5 day'));
     $NewPub = $Pub->changeStart(null);
 }