/**
  * @param ObjectManager $manager
  */
 public function load(ObjectManager $manager)
 {
     for ($i = 0; $i < 3; $i++) {
         $article = new Article();
         $article->setTitle('Article de test ' . $i);
         $article->setSlug($article->getTitle());
         $article->setContent($this->articleContent[$i]);
         $article->setExtract($this->articleExtract[$i]);
         $article->setCategory($this->getReference('category'));
         $article->setAuthor($this->getReference('user'));
         $article->setPictureName('default-image-' . $i . '.jpg');
         $manager->persist($article);
         // Reference added once
         if ($i == 0) {
             $this->addReference('article', $article);
         }
     }
     $manager->flush();
 }