Ejemplo n.º 1
0
 public function testCanCreateFromRawPost()
 {
     // Prep php://input with mocked data
     MockPhpStream::setStartingData(json_encode($this->messageData));
     stream_wrapper_unregister('php');
     stream_wrapper_register('php', __NAMESPACE__ . '\\MockPhpStream');
     $message = Message::fromRawPostData();
     $this->assertInstanceOf('Aws\\Sns\\MessageValidator\\Message', $message);
     stream_wrapper_restore("php");
 }
Ejemplo n.º 2
0
 public function testCreateFromRawPostFailsWithMissingData()
 {
     $this->setExpectedException('Aws\\Common\\Exception\\UnexpectedValueException');
     Message::fromRawPostData();
 }