| Conditions | 1 |
| Paths | 1 |
| Total Lines | 29 |
| Code Lines | 20 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 2 |
| Changes | 1 | ||
| Bugs | 0 | Features | 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')) |
||
| 19 | ->setAuthor($testUser) |
||
| 20 | ->setCreatedAt(new \DateTime()) |
||
| 21 | ->setText('Test post with many comments') |
||
| 22 | ->setPrivate(false) |
||
| 23 | ->setType(Post::TYPE_POST) |
||
| 24 | ->setDeleted(false) |
||
| 25 | ; |
||
| 26 | |||
| 27 | $shortPost = (new Post('shortpost')) |
||
| 28 | ->setAuthor($testUser) |
||
| 29 | ->setCreatedAt(new \DateTime()) |
||
| 30 | ->setText('Test short post') |
||
| 31 | ->setPrivate(false) |
||
| 32 | ->setType(Post::TYPE_POST) |
||
| 33 | ->setDeleted(false) |
||
| 34 | ; |
||
| 35 | |||
| 36 | $om->persist($longPost); |
||
| 37 | $om->persist($shortPost); |
||
| 38 | $om->flush(); |
||
| 39 | |||
| 40 | $this->addReference('test_post_longpost', $longPost); |
||
| 41 | } |
||
| 42 | |||
| 47 | } |