function testAuthenticationAccessors() { $headers = new MockSimpleHttpHeaders(); $headers->setReturnValue('getAuthentication', 'Basic'); $headers->setReturnValue('getRealm', 'Secret stuff'); $response = new MockSimpleHttpResponse(); $response->setReturnValue('getHeaders', $headers); $page = new SimplePage($response); $this->assertEqual($page->getAuthentication(), 'Basic'); $this->assertEqual($page->getRealm(), 'Secret stuff'); }
/** * Accessor for last Authentication type. Only valid * straight after a challenge (401). * @return string Description of challenge type. * @access public */ function getAuthentication() { return $this->page->getAuthentication(); }