public function testEntityWithUploadableEntities()
 {
     $artRepo = $this->em->getRepository(self::ARTICLE_CLASS);
     $article = new Article();
     $article->setTitle('Test');
     $file1 = new File();
     $file2 = new File();
     $file3 = new File();
     $article->addFile($file1);
     $article->addFile($file2);
     $article->addFile($file3);
     $filesArrayIndex = 'file';
     $fileInfo = $this->generateUploadedFile($filesArrayIndex);
     $fileInfo2 = $this->generateUploadedFile($filesArrayIndex);
     $fileInfo3 = $this->generateUploadedFile($filesArrayIndex);
     $this->listener->addEntityFileInfo($file1, $fileInfo);
     $this->listener->addEntityFileInfo($file2, $fileInfo2);
     $this->listener->addEntityFileInfo($file3, $fileInfo3);
     $this->em->persist($article);
     $this->em->flush();
     $art = $artRepo->findOneByTitle('Test');
     $files = $art->getFiles();
     $file1Path = $file1->getPath() . '/' . $fileInfo['name'];
     $file2Path = $file2->getPath() . '/' . $fileInfo['name'];
     $file3Path = $file3->getPath() . '/' . $fileInfo['name'];
     $this->assertPathEquals($file1Path, $files[0]->getFilePath());
     $this->assertPathEquals($file2Path, $files[1]->getFilePath());
     $this->assertPathEquals($file3Path, $files[2]->getFilePath());
 }