userDriver = $drv; $conf->userAuthPreferHTTP = true; $this->data = new Test\RuntimeData($conf); $this->data->user = new User($this->data); $this->data->user->authorizationEnabled(false); $users = [ 'user@example.com' => User\Driver::RIGHTS_NONE, 'user@example.org' => User\Driver::RIGHTS_NONE, 'dman@example.com' => User\Driver::RIGHTS_DOMAIN_MANAGER, 'dman@example.org' => User\Driver::RIGHTS_DOMAIN_MANAGER, 'dadm@example.com' => User\Driver::RIGHTS_DOMAIN_ADMIN, 'dadm@example.org' => User\Driver::RIGHTS_DOMAIN_ADMIN, 'gman@example.com' => User\Driver::RIGHTS_GLOBAL_MANAGER, 'gman@example.org' => User\Driver::RIGHTS_GLOBAL_MANAGER, 'gadm@example.com' => User\Driver::RIGHTS_GLOBAL_ADMIN, 'gadm@example.org' => User\Driver::RIGHTS_GLOBAL_ADMIN, ]; foreach($users as $user => $level) { $this->data->user->add($user, ""); $this->data->user->rightsSet($user, $level); } $this->data->user->authorizationEnabled(true); } function testRegularUserActingOnSelf() { $u = "user@example.com"; $this->data->user->auth($u, ""); $this->data->user->remove($u); $this->assertFalse($this->data->user->exists($u)); } }