Exemplo n.º 1
0
 /**
  * Test Get Last Saved Revision No Unpublished Pages
  *
  * @return void
  *
  * @covers \Rcm\Entity\ContainerAbstract
  */
 public function testGetLastSavedRevisionNoUnPublishedRevisions()
 {
     $revisionFour = new Revision();
     $revisionFour->setRevisionId(4);
     $revisionFour->publishRevision();
     $revisionFive = new Revision();
     $revisionFive->setRevisionId(5);
     $revisionFour->publishRevision();
     $revisionSix = new Revision();
     $revisionSix->setRevisionId(6);
     $revisionSeven = new Revision();
     $revisionSeven->setRevisionId(7);
     $revisionSeven->publishRevision();
     $revisionEight = new Revision();
     $revisionEight->setRevisionId(8);
     $revisionEight->publishRevision();
     $this->container->addRevision($revisionFour);
     $this->container->addRevision($revisionFive);
     $this->container->addRevision($revisionSix);
     $this->container->addRevision($revisionSeven);
     $this->container->addRevision($revisionEight);
     $this->container->setPublishedRevision($revisionFive);
     $this->container->setStagedRevision($revisionSix);
     $actual = $this->container->getLastSavedDraftRevision();
     $this->assertEmpty($actual);
 }