| Conditions | 1 |
| Paths | 1 |
| Total Lines | 23 |
| Code Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 13 | public function load(ObjectManager $om) |
||
| 14 | { |
||
| 15 | /** @var User $testUser */ |
||
| 16 | $testUser = $this->getReference('test_user_99999'); |
||
| 17 | |||
| 18 | $longPost = (new Post('longpost', $testUser, new \DateTime(), Post::TYPE_POST)) |
||
| 19 | ->setText('Test post with many comments') |
||
| 20 | ->setPrivate(false) |
||
| 21 | ->setDeleted(false) |
||
| 22 | ; |
||
| 23 | |||
| 24 | $shortPost = (new Post('shortpost', $testUser, new \DateTime(), Post::TYPE_POST)) |
||
| 25 | ->setText('Test short post') |
||
| 26 | ->setPrivate(false) |
||
| 27 | ->setDeleted(false) |
||
| 28 | ; |
||
| 29 | |||
| 30 | $om->persist($longPost); |
||
| 31 | $om->persist($shortPost); |
||
| 32 | $om->flush(); |
||
| 33 | |||
| 34 | $this->addReference('test_post_longpost', $longPost); |
||
| 35 | } |
||
| 36 | |||
| 41 | } |