+ function testEmptyUrlWarning() {
+ $m = new http\Message;
+ $this->setExpectedException("PHPUnit_Framework_Error_Warning");
+ $m->setRequestUrl("/foo");
+ $m->setType(http\Message::TYPE_REQUEST);
+ $this->setExpectedException("PHPUnit_Framework_Error_Warning");
+ $m->setRequestUrl("");
+ }
+
+ function testEmptyParentMessage() {
+ $m = new http\Message;
+ try {
+ $m->getParentMessage();
+ $this->assertFalse("this code should not be reached");
+ } catch (http\Exception $e) {
+ $this->assertEquals("HttpMessage does not have a parent message", $e->getMessage());
+ }
+ }
+