예제 #1
0
 public function setUp()
 {
     $this->_server = new Server();
     $this->_server->setProduction(false);
     TypeLoader::resetMap();
     $this->_acl = new \fproject\amf\acl\Acl();
 }
예제 #2
0
 public function testCtorExcection()
 {
     $this->_server->setClass('Zend_Amf_testException');
     $this->_server->setProduction(false);
     $message = new RemotingMessage();
     $message->operation = 'hello';
     $message->source = 'Zend_Amf_testException';
     $message->body = array("123");
     // create a mock message body to place th remoting message inside
     $newBody = new MessageBody(null, "/1", $message);
     $request = new Request();
     // at the requested service to a request
     $request->addAmfBody($newBody);
     $request->setObjectEncoding(0x3);
     // let the server handle mock request
     $this->_server->handle($request);
     $response = $this->_server->getResponse()->getAMFBodies();
     $this->assertTrue($response[0]->getData() instanceof ErrorMessage);
     $this->assertContains("Oops, exception!", $response[0]->getData()->faultString);
 }
예제 #3
0
 public function setUp()
 {
     $this->_server = new Server();
     $this->_server->setProduction(false);
     TypeLoader::resetMap();
 }