summaryrefslogtreecommitdiff
path: root/tests/atompub
diff options
context:
space:
mode:
authorBrion Vibber <brion@pobox.com>2010-12-14 12:36:21 -0800
committerBrion Vibber <brion@pobox.com>2010-12-14 12:36:21 -0800
commit56e72ec7a138b823b8094312d935c9644838a8eb (patch)
tree74d596960f8105f3b4772a41c71c71628c7b2405 /tests/atompub
parent3426f65736f72ede053f486b53d88d206daaaf6a (diff)
auth fix
Diffstat (limited to 'tests/atompub')
-rw-r--r--tests/atompub/atompub_test.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/atompub/atompub_test.php b/tests/atompub/atompub_test.php
index ebe948572..99a0981e5 100644
--- a/tests/atompub/atompub_test.php
+++ b/tests/atompub/atompub_test.php
@@ -67,7 +67,7 @@ class AtomPubClient
{
$client = new HTTPClient($this->url, 'GET');
// basic auth, whee
- $client->setAuth($this->user, $this->password);
+ $client->setAuth($this->user, $this->pass);
return $client;
}
@@ -78,7 +78,7 @@ class AtomPubClient
if ($response->isOk()) {
return $response->getBody();
} else {
- throw new Exception("Bogus return code: " . $response->getStatus());
+ throw new Exception("Bogus return code: " . $response->getStatus() . ': ' . $response->getBody());
}
}
@@ -102,7 +102,7 @@ class AtomPubClient
$response = $client->send();
if ($response->getStatus() != '201') {
- throw new Exception("Expected HTTP 201 on POST, got " . $response->getStatus());
+ throw new Exception("Expected HTTP 201 on POST, got " . $response->getStatus() . ': ' . $response->getBody());
}
$loc = $response->getHeader('Location');
$contentLoc = $response->getHeader('Content-Location');
@@ -142,7 +142,7 @@ class AtomPubClient
$response = $client->send();
if ($response->getStatus() != '200' && $response->getStatus() != '204') {
- throw new Exception("Expected HTTP 200 or 204 on PUT, got " . $response->getStatus());
+ throw new Exception("Expected HTTP 200 or 204 on PUT, got " . $response->getStatus() . ': ' . $response->getBody());
}
return true;
@@ -162,7 +162,7 @@ class AtomPubClient
$response = $client->send();
if ($response->getStatus() != '200' && $response->getStatus() != '204') {
- throw new Exception("Expected HTTP 200 or 204 on DELETE, got " . $response->getStatus());
+ throw new Exception("Expected HTTP 200 or 204 on DELETE, got " . $response->getStatus() . ': ' . $response->getBody());
}
return true;