private function populate()
 {
     $repo = $this->em->getRepository(self::TRANSLATION);
     $sport = new Article();
     $sport->setTitle('Sport');
     $sport->setContent('about sport');
     $repo->translate($sport, 'title', 'de_de', 'sport de')->translate($sport, 'content', 'de_de', 'content de')->translate($sport, 'title', 'ru_ru', 'sport ru')->translate($sport, 'content', 'ru_ru', 'content ru');
     $this->em->persist($sport);
     $this->em->flush();
 }
 public function testIssue84()
 {
     $repo = $this->em->getRepository(self::TRANSLATION);
     $article = new Article();
     $article->setTitle('en art');
     $article->setContent('content');
     $this->em->persist($article);
     $this->em->flush();
     $this->em->clear();
     $article = $this->em->getReference(self::ARTICLE, 1);
     $this->assertInstanceOf('Doctrine\\ORM\\Proxy\\Proxy', $article);
     $trans = $repo->findTranslations($article);
     $this->assertEquals(1, count($trans));
 }
 public function populate()
 {
     $text0 = new Article();
     $text0->setTitle('text0');
     $this->em->persist($text0);
     $text1 = new Article();
     $text1->setTitle('text1');
     $this->em->persist($text1);
     $na = new Article();
     $na->setTitle('NA');
     $this->em->persist($na);
     $out = new Article();
     $out->setTitle('Out');
     $this->em->persist($out);
     $this->em->flush();
     $this->translatableListener->setTranslatableLocale('es');
     $text1->setTitle('texto1');
     $text0->setTitle('texto0');
     $this->em->persist($text1);
     $this->em->persist($text0);
     $this->em->flush();
 }
 private function populate()
 {
     $article = new Article();
     $article->setTitle('title in en');
     $article->setContent('content in en');
     $comment1 = new Comment();
     $comment1->setSubject('subject1 in en');
     $comment1->setMessage('message1 in en');
     $comment2 = new Comment();
     $comment2->setSubject('subject2 in en');
     $comment2->setMessage('message2 in en');
     $article->addComment($comment1);
     $article->addComment($comment2);
     $this->em->persist($article);
     $this->em->persist($comment1);
     $this->em->persist($comment2);
     $this->em->flush();
     $this->articleId = $article->getId();
     $this->em->clear();
 }
 private function populate()
 {
     $repo = $this->em->getRepository(self::ARTICLE);
     $commentRepo = $this->em->getRepository(self::COMMENT);
     $food = new Article();
     $food->setTitle('Food');
     $food->setContent('about food');
     $food->setAuthor('John Doe');
     $food->setViews(99);
     $goodFood = new Comment();
     $goodFood->setArticle($food);
     $goodFood->setMessage('food is good');
     $goodFood->setSubject('good');
     $badFood = new Comment();
     $badFood->setArticle($food);
     $badFood->setMessage('food is bad');
     $badFood->setSubject('bad');
     $this->em->persist($food);
     $this->em->persist($goodFood);
     $this->em->persist($badFood);
     $this->em->flush();
     $this->em->clear();
     $this->translatableListener->setTranslatableLocale('lt_lt');
     $food = $repo->find(1);
     $food->setTitle('Maistas');
     $food->setContent('apie maista');
     $food->setViews(999);
     $goodFood = $commentRepo->find(1);
     $goodFood->setArticle($food);
     $goodFood->setMessage('maistas yra geras');
     $goodFood->setSubject('geras');
     $badFood = $commentRepo->find(2);
     $badFood->setArticle($food);
     $badFood->setMessage('maistas yra blogas');
     $badFood->setSubject('blogas');
     $this->em->persist($food);
     $this->em->persist($goodFood);
     $this->em->persist($badFood);
     $this->em->flush();
     $this->em->clear();
 }