From a55106c4782fc7b503e150d3a3a7cec1faaacf7b Mon Sep 17 00:00:00 2001 From: purplecode Date: Sun, 8 Dec 2013 12:29:33 +0100 Subject: namespace fix --- src/PCurl.php | 4 ++-- src/PCurlException.php | 2 +- test/PCurlTest.php | 16 ++-------------- 3 files changed, 5 insertions(+), 17 deletions(-) diff --git a/src/PCurl.php b/src/PCurl.php index edf3698..7102661 100644 --- a/src/PCurl.php +++ b/src/PCurl.php @@ -8,11 +8,11 @@ * under the terms of the MIT License (see http://en.wikipedia.org/wiki/MIT_License) */ -namespace PurpleCode; +namespace PurpleCode\PCurl; require_once 'PCurlException.php'; -use PurpleCode\PCurlException; +use PurpleCode\PCurl\PCurlException; class PCurl { diff --git a/src/PCurlException.php b/src/PCurlException.php index ec0d646..abed40a 100644 --- a/src/PCurlException.php +++ b/src/PCurlException.php @@ -8,7 +8,7 @@ * under the terms of the MIT License (see http://en.wikipedia.org/wiki/MIT_License) */ -namespace PurpleCode; +namespace PurpleCode\PCurl; class PCurlException extends \Exception { diff --git a/test/PCurlTest.php b/test/PCurlTest.php index 49f3410..ec301e4 100644 --- a/test/PCurlTest.php +++ b/test/PCurlTest.php @@ -2,7 +2,7 @@ require_once (dirname(__FILE__) . '/../src/PCurl.php'); -use PurpleCode\PCurl; +use PurpleCode\PCurl\PCurl; class PCurlTest extends PHPUnit_Framework_TestCase { @@ -21,18 +21,6 @@ class PCurlTest extends PHPUnit_Framework_TestCase { $this->assertSelectRegExp('title', '/Google/', 1, $response); } - - public function testShouldGetGooglePageViaHttp() { - // given - $cut = new PCurl('http://www.google.pl'); - - // when - $response = $cut->get('/'); - - // then - $this->assertSelectRegExp('title', '/Google/', 1, $response); - } - public function testShouldGetGooglePageAndCheckHttpsCertificate() { // given $cut = new PCurl('https://www.google.pl'); @@ -50,7 +38,7 @@ class PCurlTest extends PHPUnit_Framework_TestCase { $cut = new PCurl('https://www.google.com'); // then - $this->setExpectedException('PurpleCode\PCurlException'); + $this->setExpectedException('PurpleCode\PCurl\PCurlException'); // when $response = $cut->get('/'); -- cgit v1.1