/** * @expectedException \LogicException * @expectedExceptionMessage Page can't be archived in the past or before publication date. */ public function testSetArchivingWithADateBeforePublicationDateFails() { $page = new Page(); $page->setParent($this->page); $page->setPublishing(new \DateTime()); $page->setArchiving($page->getPublishing()->modify('-1 hour')); }