public function testGetSetPageNumber()
 {
     $this->page->setPageNumber($this->data['pageNumber']);
     $this->assertEquals($this->data['pageNumber'], $this->page->getPageNumber());
 }
 /**
  * @param Page $page
  *
  * @return Document
  */
 public function addPage(Page $page)
 {
     $nextPageNumber = count($this->pages) + 1;
     $page->setPageNumber($nextPageNumber);
     $page->setDocument($this);
     $this->pages->set($nextPageNumber, $page);
     return $this;
 }