Ejemplo n.º 1
0
 public function testSetRolesWithCollectionArgument()
 {
     $roles = new ArrayCollection(array(new Role(self::TEST_ROLE)));
     $this->assertCount(0, $this->group->getRoles());
     $this->group->setRoles($roles);
     $this->assertEquals($roles->toArray(), $this->group->getRoles()->toArray());
 }
 /**
  * {@inheritDoc}
  */
 public function getRoles()
 {
     $this->__initializer__ && $this->__initializer__->__invoke($this, 'getRoles', array());
     return parent::getRoles();
 }