/**
  * @inheritdoc
  */
 public function detachAndPersist(Publishing $pub, $uuid)
 {
     $comm = $pub->getCommentaryByUuid($uuid);
     $this->assertOwningRight($comm);
     $pub->detachCommentary($comm);
     $this->repository->persist($pub);
 }
 protected function assertChildren(Publishing $restore)
 {
     $this->assertCount(3, $restore->getCommentaryIterator());
     $this->assertEquals(3, $restore->getFanCount());
     $comm = iterator_to_array($restore->getCommentaryIterator());
     // checking commentary and sort
     $this->assertRegexp('#scotty#', $comm[0]->getMessage());
     $this->assertRegexp('#kirk#', $comm[1]->getMessage());
     $this->assertRegexp('#spock#', $comm[2]->getMessage());
 }
Beispiel #3
0
 protected function assertRootEquals(Publishing $doc)
 {
     $this->assertEquals("Hello there !", $doc->getMessage());
     $this->assertEquals(43.000001, $doc->getLatitude());
     $this->assertEquals(7.000001, $doc->getLongitude());
 }
 protected function assertEditContent(Publishing $doc)
 {
     $this->assertEquals('Title from ' . static::$random, $doc->getMessage());
 }
 protected function assertRootEquals(Publishing $doc)
 {
     $this->assertEquals('A title', $doc->getTitle());
     $this->assertEquals('main message', $doc->getBody());
 }