| Conditions | 2 |
| Paths | 2 |
| Total Lines | 16 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 13 | public function load(ObjectManager $manager) |
||
| 14 | { |
||
| 15 | $faker = \Faker\Factory::create(); |
||
| 16 | for ($i = 0; $i <= 50; $i++) { |
||
| 17 | $article = new Article(); |
||
| 18 | |||
| 19 | $article->setContributors( |
||
| 20 | new ArrayCollection([$this->getReference(UserFixtures::TEST_USER)]) |
||
| 21 | ); |
||
| 22 | |||
| 23 | $article->setAuthor($this->getReference(UserFixtures::TEST_USER)); |
||
| 24 | $article->setBody($faker->paragraph); |
||
| 25 | $article->setTitle($faker->sentence); |
||
| 26 | |||
| 27 | $manager->persist($article); |
||
| 28 | $manager->flush(); |
||
| 29 | } |
||
| 42 |