public function testGet()
 {
     $httpClient = new Akita_OpenIDConnect_Util_HttpClient();
     $result = $httpClient->get('http://www.yahoo.co.jp/');
     $this->assertNotEquals(false, $result);
     $result = $httpClient->get('https://www.google.co.jp/');
     $this->assertNotEquals(false, $result);
     $httpClient->setTimeout(20, 20);
     $result = $httpClient->get('https://openidconnect.info/');
     $this->assertNotEquals(false, $result);
 }
 private function setRequestObject($params, $httpClient = null)
 {
     if (is_null($httpClient)) {
         $httpClient = new Akita_OpenIDConnect_Util_HttpClient();
     }
     // get request string
     if (isset($params['request_uri'])) {
         // from request_file param
         $this->openidConnectRequest = rtrim($httpClient->get($params['request_uri']));
     } elseif (isset($params['request'])) {
         // from request param
         $this->openidConnectRequest = $params['request'];
     }
 }
 public function testSetRequestObject()
 {
     // request_uri
     $server = array();
     $params = array('request_uri' => 'https://openidconnect.info/images/dummyrequest.txt');
     $httpClient = new Akita_OpenIDConnect_Util_HttpClient();
     $httpClient->setTimeout(20, 20);
     //$httpClient->setSslVerify(false, false);
     $request = new Akita_OpenIDConnect_Server_Request('authorization', $server, $params, array(), $httpClient);
     $this->assertEquals('this_is_dummy_request', $request->openidConnectRequest, 'HTTP Request to request_uri is failed');
     // request
     $params = array('request' => 'this_is_dummy_request');
     $request = new Akita_OpenIDConnect_Server_Request('authorization', $server, $params);
     $this->assertEquals('this_is_dummy_request', $request->openidConnectRequest, 'Request setter failed');
 }