public function testNewWithEntityCollection()
 {
     $org = new Organisation();
     $org->setCn('test');
     $org->addMember($this->em->getRepository('\\OpenLdapObject\\Tests\\Manager\\People')->find('pdeparis'));
     $this->em->persist($org);
     $this->em->flush();
     $this->em->remove($org);
     $this->em->flush();
 }
 public function testAddWithObjectClass()
 {
     $org = new Organisation();
     $org->setCn('organisation')->addObjectClass('labeledUriObject')->addMember($this->em->getRepository('\\OpenLdapObject\\Tests\\Manager\\People')->find('pdeparis'));
     $this->assertEquals($org->getObjectClass()->toArray(), array('groupOfNames', 'top', 'labeledUriObject'));
     $this->em->persist($org);
     $this->em->flush();
     $structure = $this->em->getRepository('\\OpenLdapObject\\Tests\\Manager\\Organisation')->find('organisation');
     $this->assertEquals($structure->getObjectClass()->toArray(), array('groupOfNames', 'top', 'labeledUriObject'));
     $this->em->remove($structure);
     $this->em->flush();
 }