Ejemplo n.º 1
0
 public function testRole()
 {
     $name = 'test role#$%';
     $role = new AccountUserRole();
     $this->assertEmpty($role->getId());
     $this->assertEmpty($role->getLabel());
     $this->assertEmpty($role->getRole());
     $role->setLabel($name);
     $this->assertEquals($name, $role->getLabel());
     $this->assertEquals(AccountUserRole::PREFIX_ROLE, $role->getPrefix());
     $role->setRole($name);
     $this->assertStringStartsWith(AccountUserRole::PREFIX_ROLE . 'TEST_ROLE_', $role->getRole());
     $this->assertEquals($name, (string) $role);
 }