Example #1
0
 public function testPHPNullSerializedToAmf0Null()
 {
     $data = null;
     $newBody = new MessageBody('/1/onResult', null, $data);
     $this->_response->setObjectEncoding(0x0);
     $this->_response->addAmfBody($newBody);
     $this->_response->finalize();
     $testResponse = $this->_response->getResponse();
     // Load the expected response.
     $mockResponse = file_get_contents(dirname(__FILE__) . '/Response/mock/nullAmf0Response.bin');
     // Check that the response matches the expected serialized value
     $this->assertEquals($mockResponse, $testResponse);
 }