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"'); }
public function testSettingInvalidHeaderNameShouldThrowException() { $msg = 'Invalid header name "bad boy header"'; $this->setExpectedException('Wookieb\\ZorroRPC\\Exception\\InvalidHeaderException', $msg); $this->object->set('bad boy header', 'kaboom'); }