Example #1
0
 public function testSetAuthentication()
 {
     $expected = array(CURLOPT_USERPWD => "username:password", CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => false);
     $host = "https://127.0.0.1/";
     $port = "9200";
     $client = new Client($host, $port);
     $client->setAuthentication("username", "password");
     $getOptions = self::getMethod("getOptions");
     $result = $getOptions->invokeArgs($client, array());
     $this->assertEquals($expected, $result);
 }