Example #1
0
 public function testSetTunnel()
 {
     $proxy = new CurlProxy();
     $this->assertFalse($proxy->hasTunnel());
     $this->assertSame([], $proxy->getOptions());
     $proxy->setTunnel(TRUE);
     $this->assertTrue($proxy->getTunnel());
     $this->assertSame([CURLOPT_HTTPPROXYTUNNEL => TRUE], $proxy->getOptions());
     $proxy->setTunnel(FALSE);
     $this->assertFalse($proxy->getTunnel());
     $this->assertSame([CURLOPT_HTTPPROXYTUNNEL => FALSE], $proxy->getOptions());
 }