Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion test/all.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

class AllTests extends TestSuite {
function __construct() {
$this->TestSuite('all tests');
$this->label = 'all tests';
$this->collect(__DIR__.'/unit', new SimpleCollector());
}
}
7 changes: 5 additions & 2 deletions test/remote.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,12 @@
require_once 'test_helper.php';

class RemoteTests extends TestSuite {


function __construct() {
$this->TestSuite('Remote tests');

$this->label = 'Remote tests';
//??? next string means??
//$this->TestSuite('Remote tests');
// TODO: maik, v2 Scheduler not usable atm.
// $this->collect(__DIR__.'/integration', new SimpleCollector());
// TODO: maik, remove the next 2 lines when v2 Scheduler was fixed.
Expand Down
4 changes: 2 additions & 2 deletions test/unit/AddressTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ function testSerialize() {
<first_name>Hans</first_name>
<last_name>Hübner</last_name>
<address1>Kuhrfürstenstr. 124</address1>
<address2></address2>
<address2/>
<zip_code>10578</zip_code>
<city>Berlin</city>
<state></state>
<state/>
<country>DE</country>
</r>
');
Expand Down
7 changes: 4 additions & 3 deletions test/unit/CurlTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,12 @@ function testPostToInvalidShouldThrowException() {
} catch(Errors\NetworkError $exe) {
$this->assertEqual('https://test.hypercharge.net/eine/falsche/url', $exe->url);
$this->assertIdentical(404, $exe->http_status);
$this->assertEqual('The requested URL returned error: 404', $exe->technical_message);
$this->assertEqual('The requested URL returned error: 404 Not Found', $exe->technical_message);
$this->assertPattern('/^Array\n\(\n/', $exe->body);
}
}


//Returns "Connection to payment Gateway failed." Is it a security reason?
function testPostToValidUrlShouldReturnBody() {
try {
$curl = new Curl('user', 'passw');
Expand Down Expand Up @@ -77,7 +78,7 @@ function testJsonGetToInValidHostShouldThrow() {

function testJsonGetToInValidUrlShouldThrow() {
if(!$this->credentials('sandbox')) return;

try {
$curl = new Curl($this->credentials->user, $this->credentials->password);
$curl->jsonGet(new v2\Url('sandbox', 'scheduler/123455668798797'));
Expand Down