@@ -11,7 +11,7 @@ class StreamingTest extends RuntimeTest {
1111 /**
1212 * Invokes a lambda and returns the response
1313 *
14- * @param function(var, com.amazon.aws.lambda.Context , com.amazon.aws.lambda.Streaming ): void
14+ * @param function(var, com.amazon.aws.lambda.Streaming , com.amazon.aws.lambda.Context ): void
1515 * @return string
1616 */
1717 private function invoke ($ lambda ) {
@@ -29,7 +29,7 @@ public function can_create() {
2929
3030 #[Test]
3131 public function noop () {
32- $ response = $ this ->invoke (function ($ event , $ context , $ stream ) {
32+ $ response = $ this ->invoke (function ($ event , $ stream , $ context ) {
3333 // NOOP
3434 });
3535
@@ -46,7 +46,7 @@ public function noop() {
4646
4747 #[Test]
4848 public function reports_exceptions_before_streaming_via_error () {
49- $ response = $ this ->invoke (function ($ event , $ context , $ stream ) {
49+ $ response = $ this ->invoke (function ($ event , $ stream , $ context ) {
5050 throw new IllegalStateException ('Test ' );
5151 });
5252
@@ -64,7 +64,7 @@ public function reports_exceptions_before_streaming_via_error() {
6464
6565 #[Test]
6666 public function write_event_stream () {
67- $ response = $ this ->invoke (function ($ event , $ context , $ stream ) {
67+ $ response = $ this ->invoke (function ($ event , $ stream , $ context ) {
6868 $ stream ->use ('text/event-stream ' );
6969 $ stream ->write ("data: One \n\n" );
7070 $ stream ->write ("data: Two \n\n" );
@@ -85,7 +85,7 @@ public function write_event_stream() {
8585
8686 #[Test]
8787 public function transmit () {
88- $ response = $ this ->invoke (function ($ event , $ context , $ stream ) {
88+ $ response = $ this ->invoke (function ($ event , $ stream , $ context ) {
8989 $ stream ->transmit (new MemoryInputStream ('{"test":true} ' ), 'application/json ' );
9090 });
9191
@@ -104,15 +104,15 @@ public function transmit() {
104104
105105 #[Test, Expect(IllegalStateException::class)]
106106 public function writing_after_end () {
107- $ this ->invoke (function ($ event , $ context , $ stream ) {
107+ $ this ->invoke (function ($ event , $ stream , $ context ) {
108108 $ stream ->end ();
109109 $ stream ->write ('Test ' );
110110 });
111111 }
112112
113113 #[Test, Expect(IllegalStateException::class)]
114114 public function changing_mime_type_after_end () {
115- $ this ->invoke (function ($ event , $ context , $ stream ) {
115+ $ this ->invoke (function ($ event , $ stream , $ context ) {
116116 $ stream ->end ();
117117 $ stream ->use ('text/plain ' );
118118 });
0 commit comments