Beispiel #1
0
 public function testSetDefaultHeaders()
 {
     $headers = new Headers();
     $headers->set('custom-header', 'zorro rpc is awesome');
     $headers->set('another-custom-header', '2013');
     $result = $this->server->setDefaultHeaders($headers);
     $this->assertSame($this->server, $result, 'Method chaining violation at "setDefaultHeaders"');
 }
Beispiel #2
0
 public function testSettingInvalidHeaderNameShouldThrowException()
 {
     $msg = 'Invalid header name "bad boy header"';
     $this->setExpectedException('Wookieb\\ZorroRPC\\Exception\\InvalidHeaderException', $msg);
     $this->object->set('bad boy header', 'kaboom');
 }