grantAccess('acceptUserRegistration'); $user = $this->userMocker->mockSingle(); $this->assert->isNull($user->isStaffConfirmed()); $user = $this->assert->doesNotThrow(function() use ($user) { return Api::run( new AcceptUserRegistrationJob(), [ JobArgs::ARG_USER_NAME => $user->getName(), ]); }); $this->assert->isTrue($user->isStaffConfirmed()); } }