Skip to content

Commit

Permalink
SMS-6133 Adding test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
KaushikDas-Plivo committed Aug 3, 2023
1 parent 36f58dc commit e85149d
Show file tree
Hide file tree
Showing 2 changed files with 82 additions and 22 deletions.
4 changes: 2 additions & 2 deletions src/Plivo/Resources/Message/Message.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
* @property ?string $requesterIP
* @property ?string $conversationID
* @property ?string $conversationOrigin
* @property ?string $conversationExpiry
* @property ?string $conversationExpirationTimestamp
* @property ?bool $isDomestic
*/
class Message extends Resource
Expand Down Expand Up @@ -100,7 +100,7 @@ public function __construct(
$this->properties['conversationOrigin'] = $response['conversation_origin'];
}
if (!empty($response['conversation_expiration_timestamp'])) {
$this->properties['conversationExpiry'] = $response['conversation_expiration_timestamp'];
$this->properties['conversationExpirationTimestamp'] = $response['conversation_expiration_timestamp'];
}

if (isset($response['is_domestic'])){
Expand Down
100 changes: 80 additions & 20 deletions tests/Mocks/messageListResponse.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@
"replaced_sender": "INSID",
"dlt_entity_id": "9876",
"dlt_template_id": "5432",
"dlt_template_category": "promotional"
"dlt_template_category": "promotional",
"conversation_id": "12345",
"conversation_origin": "service",
"conversation_expiration_timestamp": "2023-08-03 23:02:00+05:30"
},
{
"error_code": null,
Expand All @@ -47,7 +50,10 @@
"replaced_sender": "INSID",
"dlt_entity_id": "",
"dlt_template_id": "",
"dlt_template_category": ""
"dlt_template_category": "",
"conversation_id": "",
"conversation_origin": "",
"conversation_expiration_timestamp": ""
},
{
"error_code": null,
Expand All @@ -68,7 +74,10 @@
"replaced_sender": "INSID",
"dlt_entity_id": "",
"dlt_template_id": "",
"dlt_template_category": ""
"dlt_template_category": "",
"conversation_id": "",
"conversation_origin": "",
"conversation_expiration_timestamp": ""
},
{
"error_code": null,
Expand All @@ -89,7 +98,10 @@
"replaced_sender": "INSID",
"dlt_entity_id": "",
"dlt_template_id": "",
"dlt_template_category": ""
"dlt_template_category": "",
"conversation_id": "",
"conversation_origin": "",
"conversation_expiration_timestamp": ""
},
{
"error_code": null,
Expand All @@ -110,7 +122,10 @@
"replaced_sender": "INSID",
"dlt_entity_id": "",
"dlt_template_id": "",
"dlt_template_category": ""
"dlt_template_category": "",
"conversation_id": "",
"conversation_origin": "",
"conversation_expiration_timestamp": ""
},
{
"error_code": null,
Expand All @@ -131,7 +146,10 @@
"replaced_sender": "INSID",
"dlt_entity_id": "",
"dlt_template_id": "",
"dlt_template_category": ""
"dlt_template_category": "",
"conversation_id": "",
"conversation_origin": "",
"conversation_expiration_timestamp": ""
},
{
"error_code": null,
Expand All @@ -152,7 +170,10 @@
"replaced_sender": "INSID",
"dlt_entity_id": "",
"dlt_template_id": "",
"dlt_template_category": ""
"dlt_template_category": "",
"conversation_id": "",
"conversation_origin": "",
"conversation_expiration_timestamp": ""
},
{
"error_code": null,
Expand All @@ -173,7 +194,10 @@
"replaced_sender": "INSID",
"dlt_entity_id": "",
"dlt_template_id": "",
"dlt_template_category": ""
"dlt_template_category": "",
"conversation_id": "",
"conversation_origin": "",
"conversation_expiration_timestamp": ""
},
{
"error_code": "000",
Expand All @@ -194,7 +218,10 @@
"replaced_sender": "INSID",
"dlt_entity_id": "",
"dlt_template_id": "",
"dlt_template_category": ""
"dlt_template_category": "",
"conversation_id": "",
"conversation_origin": "",
"conversation_expiration_timestamp": ""
},
{
"error_code": null,
Expand All @@ -215,7 +242,10 @@
"replaced_sender": "INSID",
"dlt_entity_id": "",
"dlt_template_id": "",
"dlt_template_category": ""
"dlt_template_category": "",
"conversation_id": "",
"conversation_origin": "",
"conversation_expiration_timestamp": ""
},
{
"error_code": "000",
Expand All @@ -236,7 +266,10 @@
"replaced_sender": "INSID",
"dlt_entity_id": "",
"dlt_template_id": "",
"dlt_template_category": ""
"dlt_template_category": "",
"conversation_id": "",
"conversation_origin": "",
"conversation_expiration_timestamp": ""
},
{
"error_code": null,
Expand All @@ -257,7 +290,10 @@
"replaced_sender": "INSID",
"dlt_entity_id": "",
"dlt_template_id": "",
"dlt_template_category": ""
"dlt_template_category": "",
"conversation_id": "",
"conversation_origin": "",
"conversation_expiration_timestamp": ""
},
{
"error_code": "000",
Expand All @@ -278,7 +314,10 @@
"replaced_sender": "INSID",
"dlt_entity_id": "",
"dlt_template_id": "",
"dlt_template_category": ""
"dlt_template_category": "",
"conversation_id": "",
"conversation_origin": "",
"conversation_expiration_timestamp": ""
},
{
"error_code": null,
Expand All @@ -299,7 +338,10 @@
"replaced_sender": "INSID",
"dlt_entity_id": "",
"dlt_template_id": "",
"dlt_template_category": ""
"dlt_template_category": "",
"conversation_id": "",
"conversation_origin": "",
"conversation_expiration_timestamp": ""
},
{
"error_code": "000",
Expand All @@ -320,7 +362,10 @@
"replaced_sender": "INSID",
"dlt_entity_id": "",
"dlt_template_id": "",
"dlt_template_category": ""
"dlt_template_category": "",
"conversation_id": "",
"conversation_origin": "",
"conversation_expiration_timestamp": ""
},
{
"error_code": null,
Expand All @@ -341,7 +386,10 @@
"replaced_sender": "INSID",
"dlt_entity_id": "",
"dlt_template_id": "",
"dlt_template_category": ""
"dlt_template_category": "",
"conversation_id": "",
"conversation_origin": "",
"conversation_expiration_timestamp": ""
},
{
"error_code": "000",
Expand All @@ -362,7 +410,10 @@
"replaced_sender": "INSID",
"dlt_entity_id": "",
"dlt_template_id": "",
"dlt_template_category": ""
"dlt_template_category": "",
"conversation_id": "",
"conversation_origin": "",
"conversation_expiration_timestamp": ""
},
{
"error_code": "000",
Expand All @@ -383,7 +434,10 @@
"replaced_sender": "INSID",
"dlt_entity_id": "",
"dlt_template_id": "",
"dlt_template_category": ""
"dlt_template_category": "",
"conversation_id": "",
"conversation_origin": "",
"conversation_expiration_timestamp": ""
},
{
"error_code": "000",
Expand All @@ -404,7 +458,10 @@
"replaced_sender": "INSID",
"dlt_entity_id": "",
"dlt_template_id": "",
"dlt_template_category": ""
"dlt_template_category": "",
"conversation_id": "",
"conversation_origin": "",
"conversation_expiration_timestamp": ""
},
{
"error_code": "000",
Expand All @@ -425,7 +482,10 @@
"replaced_sender": "INSID",
"dlt_entity_id": "",
"dlt_template_id": "",
"dlt_template_category": ""
"dlt_template_category": "",
"conversation_id": "",
"conversation_origin": "",
"conversation_expiration_timestamp": ""
}
]
}

0 comments on commit e85149d

Please sign in to comment.