Fix testSendRequestWithException() test in CurlAdapterTest
This commit is contained in:
parent
95f351271b
commit
58b99f9c4e
@ -29,24 +29,25 @@ class CurlAdapterTest extends \PHPUnit_Framework_TestCase
|
||||
$this->assertEquals(array(), $adapter->getCurlOptions());
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException \Bitpay\Client\ConnectionException
|
||||
*/
|
||||
public function testSendRequestWithException()
|
||||
{
|
||||
$this->setExpectedException('Bitpay\Client\ConnectionException');
|
||||
|
||||
$curl_options = array(
|
||||
CURLOPT_URL => "www.example.com",
|
||||
CURLOPT_URL => 'btcpay.example.com',
|
||||
CURLOPT_SSL_VERIFYPEER => 1,
|
||||
CURLOPT_SSL_VERIFYHOST => 2,
|
||||
);
|
||||
|
||||
$adapter = new CurlAdapter($curl_options);
|
||||
$response = $adapter->sendRequest($this->request);
|
||||
$adapter->sendRequest($this->request);
|
||||
}
|
||||
|
||||
public function testSendRequestWithoutException()
|
||||
{
|
||||
$curl_options = array(
|
||||
CURLOPT_URL => "www.bitpay.com",
|
||||
CURLOPT_URL => 'www.bitpay.com',
|
||||
CURLOPT_SSL_VERIFYPEER => 1,
|
||||
CURLOPT_SSL_VERIFYHOST => 2,
|
||||
);
|
||||
@ -56,4 +57,4 @@ class CurlAdapterTest extends \PHPUnit_Framework_TestCase
|
||||
$this->assertNotNull($response);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user