File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -60,20 +60,20 @@ public function testCreateMessageInvalidPhoneNumber() {
60
60
61
61
public function testUploadDownloadMedia () {
62
62
//constants
63
-
64
- $ mediaFileName = "php-monitoring " ;
65
- $ mediaFile = " 12345 " ; //todo: confirm binary string?
63
+ $ mediaId = " text-media-id- " . uniqid ();
64
+ $ content = "Hello world " ;
65
+
66
66
//media upload
67
- $ this ->bandwidthClient ->getMessaging ()->getClient ()->uploadMedia (getenv ("BW_ACCOUNT_ID " ), $ mediaFileName , $ mediaFile );
67
+ $ this ->bandwidthClient ->getMessaging ()->getClient ()->uploadMedia (getenv ("BW_ACCOUNT_ID " ), $ mediaId , $ content );
68
68
69
69
//media download
70
- $ downloadedMediaFile = $ this ->bandwidthClient ->getMessaging ()->getClient ()->getMedia (getenv ("BW_ACCOUNT_ID " ), $ mediaFileName )->getResult ();
70
+ $ downloadedContent = $ this ->bandwidthClient ->getMessaging ()->getClient ()->getMedia (getenv ("BW_ACCOUNT_ID " ), $ mediaId )->getResult ();
71
71
72
72
//media delete
73
- $ deleteMedaiFile = $ this ->bandwidthClient ->getMessaging ()->getClient ()->deleteMedia (getenv ("BW_ACCOUNT_ID " ), $ mediaFileName );
73
+ $ this ->bandwidthClient ->getMessaging ()->getClient ()->deleteMedia (getenv ("BW_ACCOUNT_ID " ), $ mediaId );
74
74
75
75
//validate that response is the same
76
- $ this ->assertEquals ($ downloadedMediaFile , $ mediaFile );
76
+ $ this ->assertEquals ($ downloadedContent , $ content );
77
77
}
78
78
79
79
public function testCreateCallAndGetCallState () {
You can’t perform that action at this time.
0 commit comments