/** * Returns an associative array with the data about the user. * Fields array described in the method Init::setFields * * @example <code> * $this->getUser(); * </code> * * @return boolean|array data provided by the ISP authentication */ public function getUser() { if ($this->user === false) { $this->session->remove(self::KEY); $this->session->set(self::KEY, parent::getUser()); } return $this->user; }
/** * @covers ULogin\Init::getUser() */ public function testGetUser() { // call method with non auth user data $user = $this->init->getUser(); $this->assertFalse($user, "[-] the first instance of user must equal false"); }