コード例 #1
0
ファイル: ResourceTest.php プロジェクト: robertodormepoco/zf2
 protected function _callService($method, $class = 'ZendTest\\Amf\\TestAsset\\testclass')
 {
     $request = new \Zend\Amf\Request\StreamRequest();
     $request->setObjectEncoding(0x3);
     $this->_server->setClass($class);
     $newBody = new \Zend\Amf\Value\MessageBody("{$class}.{$method}", "/1", array("test"));
     $request->addAmfBody($newBody);
     $this->_server->handle($request);
     $response = $this->_server->getResponse();
     return $response;
 }
コード例 #2
0
ファイル: ResponseTest.php プロジェクト: robertodormepoco/zf2
 public function testResponseHeadersShouldBeSerializedWhenWritingMessage()
 {
     $this->testResponseShouldAggregateMessageHeaders();
     $this->_response->finalize();
     $response = $this->_response->getResponse();
     $request = new \Zend\Amf\Request\StreamRequest();
     $request->initialize($response);
     $headers = $request->getAmfHeaders();
     $this->assertEquals(2, count($headers));
 }