From 58b99f9c4e5bfa548b53713ea7effd6239ecddcd Mon Sep 17 00:00:00 2001 From: kakaska Date: Thu, 14 Feb 2019 18:34:05 +0100 Subject: [PATCH] Fix testSendRequestWithException() test in CurlAdapterTest --- tests/Bitpay/Client/Adapter/CurlAdapterTest.php | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/tests/Bitpay/Client/Adapter/CurlAdapterTest.php b/tests/Bitpay/Client/Adapter/CurlAdapterTest.php index b511ab3..ebe6300 100644 --- a/tests/Bitpay/Client/Adapter/CurlAdapterTest.php +++ b/tests/Bitpay/Client/Adapter/CurlAdapterTest.php @@ -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); } -} \ No newline at end of file +}