Example #1
0
 function __construct($options = array())
 {
     parent::__construct($options);
     $this->setIfExists('path', $options, 'setPath');
     $this->setIfExists('method', $options, 'setMethod');
     $this->setIfExists('params', $options, 'setParams');
 }
 function testRequestSettingHeadersOnCreation()
 {
     $M = new Message(array('headers' => array('foo' => 'Foo', 'bar' => 'Baz')));
     $this->assertEquals('Foo', $M->getHeader('foo'));
     $this->assertEquals('Baz', $M->getHeader('bar'));
 }
Example #3
0
 function __construct($options = array())
 {
     parent::__construct($options);
     $this->setIfExists('status', $options, 'setStatus');
 }