diff --git a/AmazonPay/Client.php b/AmazonPay/Client.php index 3fe372c..9a8910e 100644 --- a/AmazonPay/Client.php +++ b/AmazonPay/Client.php @@ -7,17 +7,6 @@ * returns Response Object */ -require_once 'ResponseParser.php'; -require_once 'HttpCurl.php'; -require_once 'ClientInterface.php'; -require_once 'Regions.php'; -if (!interface_exists('\Psr\Log\LoggerAwareInterface')) { - require_once(__DIR__.'/../Psr/Log/LoggerAwareInterface.php'); -} - -if (!interface_exists('\Psr\Log\LoggerInterface')) { - require_once(__DIR__.'/../Psr/Log/LoggerInterface.php'); -} use Psr\Log\LoggerAwareInterface; use Psr\Log\LoggerInterface; diff --git a/AmazonPay/HttpCurl.php b/AmazonPay/HttpCurl.php index df281b2..ed8a76b 100644 --- a/AmazonPay/HttpCurl.php +++ b/AmazonPay/HttpCurl.php @@ -5,8 +5,6 @@ * Handles Curl POST function for all requests */ -require_once 'HttpCurlInterface.php'; - class HttpCurl implements HttpCurlInterface { private $config = array(); diff --git a/AmazonPay/IpnHandler.php b/AmazonPay/IpnHandler.php index 3b4df8a..86f763d 100644 --- a/AmazonPay/IpnHandler.php +++ b/AmazonPay/IpnHandler.php @@ -1,4 +1,5 @@ + + + Test/Unit + + + \ No newline at end of file diff --git a/tst/unit/ClientTest.php b/test/Unit/ClientTest.php similarity index 99% rename from tst/unit/ClientTest.php rename to test/Unit/ClientTest.php index 9345b23..14d3a71 100644 --- a/tst/unit/ClientTest.php +++ b/test/Unit/ClientTest.php @@ -1,9 +1,9 @@ assertTrue((bool)$client->__get('sandbox')); @@ -108,22 +108,22 @@ public function testJsonFile() $this->assertEquals('1.0', $client->__get('application_version')); try { - $configParams = "tst/unit/config/sandbox_true_string.json"; + $configParams = "test/Unit/config/sandbox_true_string.json"; $client = new Client($configParams); } catch (\Exception $expected) { $this->assertRegExp('/should be a boolean value/i', strval($expected)); } - $configParams = "tst/unit/config/sandbox_false_bool.json"; + $configParams = "test/Unit/config/sandbox_false_bool.json"; $client = new Client($configParams); $this->assertFalse((bool)$client->__get('sandbox')); - $configParams = "tst/unit/config/sandbox_none.json"; + $configParams = "test/Unit/config/sandbox_none.json"; $client = new Client($configParams); $this->assertFalse((bool)$client->__get('sandbox')); try { - $configParams = "tst/unit/config/sandbox_false_string.json"; + $configParams = "test/unit/config/sandbox_false_string.json"; $client = new Client($configParams); } catch (\Exception $expected) { $this->assertRegExp('/should be a boolean value/i', strval($expected)); diff --git a/tst/unit/IpnHandlerTest.php b/test/Unit/IpnHandlerTest.php similarity index 98% rename from tst/unit/IpnHandlerTest.php rename to test/Unit/IpnHandlerTest.php index 5c5cea4..875ffe0 100644 --- a/tst/unit/IpnHandlerTest.php +++ b/test/Unit/IpnHandlerTest.php @@ -1,7 +1,8 @@