From: Michael Wallner Date: Sun, 19 Mar 2006 13:13:16 +0000 (+0000) Subject: - some test fixup X-Git-Tag: RELEASE_1_0_0RC1~3 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=367f82c6492b0fcdc23491ee3454d042ed34c104;p=m6w6%2Fext-http - some test fixup --- diff --git a/tests/HttpMessage_001.phpt b/tests/HttpMessage_001.phpt index c2fe79a..e787523 100644 --- a/tests/HttpMessage_001.phpt +++ b/tests/HttpMessage_001.phpt @@ -30,9 +30,12 @@ $x = $m->getParentMessage(); var_dump($m->getBody()); var_dump(HttpMessage::fromString($m->toString(true))->toString(true)); -do { - var_dump($m->toString()); -} while ($m = $m->getParentMessage()); +try { + do { + var_dump($m->toString()); + } while ($m = $m->getParentMessage()); +} catch (HttpException $ex) { +} echo "Done\n"; ?> diff --git a/tests/HttpRequest_004.phpt b/tests/HttpRequest_004.phpt index a9ade65..4c253e0 100644 --- a/tests/HttpRequest_004.phpt +++ b/tests/HttpRequest_004.phpt @@ -69,7 +69,7 @@ array(2) { } Second Request -string(269) "Array +string(285) "Array ( [0] => Array ( @@ -84,7 +84,7 @@ string(269) "Array ) ) -string(56) "0[int]=1&0[dbl]=3.1415926535898&1[str]=something&1[nil]=" +string(72) "0%5Bint%5D=1&0%5Bdbl%5D=3.1415926535898&1%5Bstr%5D=something&1%5Bnil%5D=" " array(2) { [0]=> @@ -104,7 +104,7 @@ array(2) { } Third Request -string(286) "Array +string(302) "Array ( [0] => Array ( @@ -120,7 +120,7 @@ string(286) "Array [x] => X ) -string(60) "0[int]=1&0[dbl]=3.1415926535898&1[str]=something&1[nil]=&x=X" +string(76) "0%5Bint%5D=1&0%5Bdbl%5D=3.1415926535898&1%5Bstr%5D=something&1%5Bnil%5D=&x=X" " array(2) { [0]=> diff --git a/tests/build_url_001.phpt b/tests/build_url_001.phpt index 541e0f3..d131f55 100644 --- a/tests/build_url_001.phpt +++ b/tests/build_url_001.phpt @@ -9,9 +9,10 @@ include 'skip.inc'; echo "-TEST\n"; echo http_build_url('page'), "\n"; echo http_build_url('with/some/path/'), "\n"; +echo "Done\n"; ?> --EXPECTF-- %sTEST -http://localhost/page -http://localhost/with/some/path/ - +http://%s/page +http://%s/with/some/path/ +Done diff --git a/tests/ut_HttpMessage.phpt b/tests/ut_HttpMessage.phpt index 9e8e6d1..dd36680 100644 --- a/tests/ut_HttpMessage.phpt +++ b/tests/ut_HttpMessage.phpt @@ -164,9 +164,12 @@ class HttpMessageTest extends PHPUnit2_Framework_TestCase function test_getParentMessage() { - $this->assertNull($this->emptyMessage->getParentMessage()); $this->assertTrue($this->responseMessage->getParentMessage() instanceOf HttpMessage); - $this->assertNull($this->requestMessage->getParentMessage()); + try { + $this->requestMessage->getParentMessage(); + $this->assertTrue(false, "\$this->requestMessage->getParentMessage() did not throw an exception"); + } catch (HttpRuntimeException $ex) { + } } function test_send()