summaryrefslogtreecommitdiffstats
path: root/test/PCurlTest.php
diff options
context:
space:
mode:
authorMateusz Jaworski <mateusz.jaworski@nokia.com>2015-07-31 09:09:38 +0200
committerMateusz Jaworski <mateusz.jaworski@nokia.com>2015-07-31 09:09:38 +0200
commit7d8941fee6cece66ae3f872beb8f71ddcf4bcb1c (patch)
treed39a341fcd76b5f5d6fc0832bc9504f11c4a6495 /test/PCurlTest.php
parentfd0f39cb224de007e6135c9e08cc9429c7b5a9dc (diff)
downloadphp.curl-7d8941fee6cece66ae3f872beb8f71ddcf4bcb1c.zip
php.curl-7d8941fee6cece66ae3f872beb8f71ddcf4bcb1c.tar.gz
php.curl-7d8941fee6cece66ae3f872beb8f71ddcf4bcb1c.tar.bz2
curl error code in exception
Diffstat (limited to 'test/PCurlTest.php')
-rw-r--r--test/PCurlTest.php10
1 files changed, 4 insertions, 6 deletions
diff --git a/test/PCurlTest.php b/test/PCurlTest.php
index a3c0724..0fbc610 100644
--- a/test/PCurlTest.php
+++ b/test/PCurlTest.php
@@ -18,7 +18,7 @@ class PCurlTest extends PHPUnit_Framework_TestCase {
$response = $cut->get('/');
// then
- $this->assertSelectRegExp('title', '/Google/', 1, $response->getBody());
+ $this->assertSelectEquals('title', '/Google/', 1, $response->getBody());
$this->assertEquals(200, $response->getHttpCode());
}
@@ -31,7 +31,7 @@ class PCurlTest extends PHPUnit_Framework_TestCase {
$response = $cut->get('/');
// then
- $this->assertSelectRegExp('title', '/Google/', 1, $response->getBody());
+ $this->assertSelectEquals('title', '/Google/', 1, $response->getBody());
}
public function testShouldGetGooglePageAndThrowExceptionOnMissingCertificate() {
@@ -42,15 +42,13 @@ class PCurlTest extends PHPUnit_Framework_TestCase {
$this->setExpectedException('PurpleCode\PCurl\PCurlException');
// when
- $response = $cut->get('/');
+ $cut->get('/');
}
public function testShouldSetProperResponseCodeOnBadRequest() {
// given
$cut = new PCurl('http://www.google.com/pcurlnotfound');
- // then
- //$this->setExpectedException('PurpleCode\PCurl\PCurlException');
// when
$response = $cut->get('/');
@@ -66,7 +64,7 @@ class PCurlTest extends PHPUnit_Framework_TestCase {
$this->setExpectedException('PurpleCode\PCurl\PCurlException');
// when
- $response = $cut->get('/')->assertSuccess();
+ $cut->get('/')->assertSuccess();
}
}