@@ -36,7 +36,7 @@ public function testSendTransactional(): void
3636 $ attachments = [
3737 [
3838 'filename ' => 'test.pdf ' ,
39- 'content_type ' => 'application/pdf ' ,
39+ 'contentType ' => 'application/pdf ' ,
4040 'data ' => 'base64_encoded_data '
4141 ]
4242 ];
@@ -61,17 +61,17 @@ public function testSendTransactional(): void
6161 ], $ custom_headers );
6262
6363 // Verify payload structure
64- $ has_required_fields = isset ($ payload ['transactional_id ' ])
64+ $ has_required_fields = isset ($ payload ['transactionalId ' ])
6565 && isset ($ payload ['email ' ])
66- && isset ($ payload ['add_to_audience ' ])
67- && isset ($ payload ['data_variables ' ])
66+ && isset ($ payload ['addToAudience ' ])
67+ && isset ($ payload ['dataVariables ' ])
6868 && isset ($ payload ['attachments ' ]);
6969
7070 // Verify payload values
71- $ has_correct_values = $ payload ['transactional_id ' ] === $ transactional_id
71+ $ has_correct_values = $ payload ['transactionalId ' ] === $ transactional_id
7272 && $ payload ['email ' ] === $ email
73- && $ payload ['add_to_audience ' ] === $ add_to_audience
74- && $ payload ['data_variables ' ] === $ data_variables
73+ && $ payload ['addToAudience ' ] === $ add_to_audience
74+ && $ payload ['dataVariables ' ] === $ data_variables
7575 && $ payload ['attachments ' ] === $ attachments ;
7676
7777 // Verify headers
@@ -84,8 +84,6 @@ public function testSendTransactional(): void
8484 status: 200 ,
8585 body: json_encode ([
8686 'success ' => true ,
87- 'id ' => 'clfn0k1yg001imo0fdeqg30i8 ' ,
88- 'sentAt ' => '2024-03-14T19:02:52.000Z '
8987 ])
9088 ));
9189
@@ -102,15 +100,9 @@ public function testSendTransactional(): void
102100 // Assert the response structure
103101 $ this ->assertIsArray ($ result );
104102 $ this ->assertArrayHasKey ('success ' , $ result );
105- $ this ->assertArrayHasKey ('id ' , $ result );
106- $ this ->assertArrayHasKey ('sentAt ' , $ result );
107103
108104 // Assert response values
109105 $ this ->assertTrue ($ result ['success ' ]);
110- $ this ->assertIsString ($ result ['id ' ]);
111- $ this ->assertNotEmpty ($ result ['id ' ]);
112- $ this ->assertIsString ($ result ['sentAt ' ]);
113- $ this ->assertNotEmpty ($ result ['sentAt ' ]);
114106 }
115107
116108 public function testGetTransactionals (): void
0 commit comments