private function createTextnodes(ManagerRegistry $mongo, DocumentManager $dm)
 {
     $loremIpsumLength = 3500;
     $repository = $mongo->getRepository('DembeloMain:Textnode');
     $allAccessNodes = $repository->findByAccess(true);
     if (count($allAccessNodes) >= 7) {
         return;
     }
     $loremIpsum = $this->getContainer()->get('apoutchika.lorem_ipsum');
     $textnodeData = array(array('topic' => $this->dummyData['topics'][0], 'text' => $loremIpsum->getWords($loremIpsumLength), 'access' => true, 'licensee' => $this->dummyData['licensees'][0], 'metadata' => array('Titel' => 'Titel 1', 'Autor' => 'Autor 1', 'Verlag' => 'Verlag 1')), array('text' => $loremIpsum->getWords($loremIpsumLength), 'access' => false, 'licensee' => $this->dummyData['licensees'][0], 'metadata' => array('Titel' => 'Titel 2', 'Autor' => 'Autor 2', 'Verlag' => 'Verlag 2')), array('text' => $loremIpsum->getWords($loremIpsumLength), 'access' => false, 'licensee' => $this->dummyData['licensees'][0], 'metadata' => array('Titel' => 'Titel 3', 'Autor' => 'Autor 3', 'Verlag' => 'Verlag 3')), array('topic' => $this->dummyData['topics'][1], 'text' => $loremIpsum->getWords($loremIpsumLength), 'access' => true, 'licensee' => $this->dummyData['licensees'][0], 'metadata' => array('Titel' => 'Titel 4', 'Autor' => 'Autor 4', 'Verlag' => 'Verlag 4')), array('text' => $loremIpsum->getWords($loremIpsumLength), 'access' => false, 'licensee' => $this->dummyData['licensees'][0], 'metadata' => array('Titel' => 'Titel 5', 'Autor' => 'Autor 5', 'Verlag' => 'Verlag 5')), array('text' => $loremIpsum->getWords($loremIpsumLength), 'access' => false, 'licensee' => $this->dummyData['licensees'][0], 'metadata' => array('Titel' => 'Titel 6', 'Autor' => 'Autor 6', 'Verlag' => 'Verlag 6')));
     foreach ($textnodeData as $textnodeDatum) {
         $textnode = new Textnode();
         $textnode->setStatus(Textnode::STATUS_ACTIVE);
         if (isset($textnodeDatum['topic'])) {
             $textnode->setTopicId($textnodeDatum['topic']->getId());
         }
         if (isset($textnodeDatum['licensee'])) {
             $textnode->setLicenseeId($textnodeDatum['licensee']->getId());
         }
         $textnode->setCreated(date('Y-m-d H:i:s'));
         $textnode->setText($textnodeDatum['text']);
         $textnode->setAccess($textnodeDatum['access']);
         $textnode->setMetadata($textnodeDatum['metadata']);
         $dm->persist($textnode);
         $this->dummyData['textnodes'][] = $textnode;
     }
 }
 /**
  * tests the licensee ID
  */
 public function testLicenseeId()
 {
     $licenseeId = 'asd23fasdf';
     $this->textnode->setLicenseeId($licenseeId);
     $this->assertEquals($licenseeId, $this->textnode->getLicenseeId());
 }