/** * Returns the actual user object behind the context. * * @return User The user object behind the context */ public function getContextUser() { if (!isset($this->user)) { $this->user = User::fromConfig($this->invokeGet('SHOW_USER_CONFIG'), $this); } return $this->user; }
/** * @depends testImpersonate * @expectedException \Omines\DirectAdmin\DirectAdminException * @expectedExceptionMessage Unknown user type 'invalid' */ public function testInvalidUserType(UserContext $context) { User::fromConfig(['username' => 'invalid', 'usertype' => 'invalid'], $context); }