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');
 }
 public function createRedirect($content, $redirect)
 {
     $headers = new MockSimpleHttpHeaders();
     $headers->returnsByValue('isRedirect', (bool) $redirect);
     $headers->returnsByValue('getLocation', $redirect);
     $response = new MockSimpleHttpResponse();
     $response->returnsByValue('getContent', $content);
     $response->returnsByReference('getHeaders', $headers);
     $request = new MockSimpleHttpRequest();
     $request->returnsByReference('fetch', $response);
     return $request;
 }