| @@ 56-67 (lines=12) @@ | ||
| 53 | $this->agent->setParent($page, $parent); |
|
| 54 | } |
|
| 55 | ||
| 56 | private function createPage($title = 'Hello World') |
|
| 57 | { |
|
| 58 | static $id = 1; |
|
| 59 | ||
| 60 | $page = new Page(); |
|
| 61 | $page->title = $title; |
|
| 62 | $page->path = '/test/page-' . $id++; |
|
| 63 | $this->documentManager->persist($page); |
|
| 64 | $this->documentManager->flush(); |
|
| 65 | ||
| 66 | return $page; |
|
| 67 | } |
|
| 68 | } |
|
| 69 | ||
| @@ 38-48 (lines=11) @@ | ||
| 35 | $this->agent->setParent($page, $parent); |
|
| 36 | } |
|
| 37 | ||
| 38 | private function createPage($title = 'Hello World') |
|
| 39 | { |
|
| 40 | static $id = 1; |
|
| 41 | $page = new Page(); |
|
| 42 | $page->id = $id++; |
|
| 43 | $page->title = $title; |
|
| 44 | $this->entityManager->persist($page); |
|
| 45 | $this->entityManager->flush(); |
|
| 46 | ||
| 47 | return $page; |
|
| 48 | } |
|
| 49 | ||
| 50 | private function createCommentForPage(Page $page, string $title) |
|
| 51 | { |
|
| @@ 50-57 (lines=8) @@ | ||
| 47 | return $page; |
|
| 48 | } |
|
| 49 | ||
| 50 | private function createCommentForPage(Page $page, string $title) |
|
| 51 | { |
|
| 52 | static $id = 1; |
|
| 53 | $comment = new Comment($page, $title); |
|
| 54 | $comment->id = $id++; |
|
| 55 | $this->entityManager->persist($comment); |
|
| 56 | $this->entityManager->flush(); |
|
| 57 | } |
|
| 58 | } |
|
| 59 | ||