Beispiel #1
0
 public function testSetters()
 {
     $page = new Page();
     $page->setTitle('Imprint');
     $this->assertEquals('Imprint', $page->getTitle());
     $page->setRoute('imprint');
     $this->assertEquals('imprint', $page->getRoute());
     $page->setContent('lorem ipsum');
     $this->assertEquals('lorem ipsum', $page->getContent());
     $page->setStatus('published');
     $this->assertEquals('published', $page->getStatus());
     $now = new \DateTime('now');
     $page->setCreated($now);
     $this->assertEquals($now, $page->getCreated());
     $page->setUpdated($now);
     $this->assertEquals($now, $page->getUpdated());
 }