protected function _callService($method, $class = 'ZendTest\\Amf\\TestAsset\\testclass') { $request = new \ZendAmf\Request\StreamRequest(); $request->setObjectEncoding(0x3); $this->_server->setClass($class); $newBody = new \ZendAmf\Value\MessageBody("{$class}.{$method}", "/1", array("test")); $request->addAmfBody($newBody); $this->_server->handle($request); $response = $this->_server->getResponse(); return $response; }
public function testResponseHeadersShouldBeSerializedWhenWritingMessage() { $this->testResponseShouldAggregateMessageHeaders(); $this->_response->finalize(); $response = $this->_response->getResponse(); $request = new \ZendAmf\Request\StreamRequest(); $request->initialize($response); $headers = $request->getAmfHeaders(); $this->assertEquals(2, count($headers)); }