/** * @param $role UserRole * @return RoleDto */ public function mapUserRoleToDto(UserRole $role) { $roleDto = new RoleDto(); $roleDto->setId($role->getId()); $roleDto->setName($role->getName()); return $roleDto; }
public function testCreate() { $userRole = new UserRole(); $userRole->setName('Administrator'); $userRole->setDescription('Admin account with access to everything.'); $this->assertSame('Administrator', $userRole->getName()); $this->assertSame('Admin account with access to everything.', $userRole->getDescription()); }