protected function getExtensions()
 {
     $this->roleBuilder = $roleBuilder = $this->getMockBuilder('Sonata\\UserBundle\\Security\\EditableRolesBuilder')->disableOriginalConstructor()->getMock();
     $this->roleBuilder->expects($this->any())->method('getRoles')->will($this->returnValue(array(0 => array('ROLE_FOO' => 'ROLE_FOO', 'ROLE_USER' => 'ROLE_USER', 'ROLE_ADMIN' => 'ROLE_ADMIN: ROLE_USER'), 1 => array())));
     $childType = new SecurityRolesType($this->roleBuilder);
     return array(new PreloadedExtension(array($childType->getName() => $childType), array()));
 }
 public function testGetName()
 {
     $type = new SecurityRolesType($this->roleBuilder);
     $this->assertEquals('sonata_security_roles', $type->getName());
 }