| 1 | 1 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1,66 @@ |
| 1 |
+<?php |
|
| 2 |
+ |
|
| 3 |
+namespace Resources; |
|
| 4 |
+ |
|
| 5 |
+ |
|
| 6 |
+use Plivo\Http\PlivoRequest; |
|
| 7 |
+use Plivo\Http\PlivoResponse; |
|
| 8 |
+use Plivo\Tests\BaseTestCase; |
|
| 9 |
+ |
|
| 10 |
+/** |
|
| 11 |
+ * Class TollfreeVerificationTest |
|
| 12 |
+ * @package Resources |
|
| 13 |
+ */ |
|
| 14 |
+class TollfreeVerificationTest extends BaseTestCase |
|
| 15 |
+{
|
|
| 16 |
+ function testTollfreeVerificationList() |
|
| 17 |
+ {
|
|
| 18 |
+ $request = new PlivoRequest( |
|
| 19 |
+ 'GET', |
|
| 20 |
+ 'Account/MAXXXXXXXXXXXXXXXXXX/TollfreeVerification/', |
|
| 21 |
+ []); |
|
| 22 |
+ $body = file_get_contents(__DIR__ . '/../Mocks/tollfreeVerificationListResponse.json'); |
|
| 23 |
+ |
|
| 24 |
+ $this->mock(new PlivoResponse($request,200, $body)); |
|
| 25 |
+ |
|
| 26 |
+ $actual = $this->client->tollfreeVerification->getList(); |
|
| 27 |
+ |
|
| 28 |
+ $this->assertRequest($request); |
|
| 29 |
+ |
|
| 30 |
+ self::assertNotNull($actual); |
|
| 31 |
+ |
|
| 32 |
+ self::assertGreaterThan(0, count($actual->get())); |
|
| 33 |
+ } |
|
| 34 |
+ |
|
| 35 |
+// function testTollfreeVerificationCreate() |
|
| 36 |
+// {
|
|
| 37 |
+// $request = new PlivoRequest( |
|
| 38 |
+// 'POST', |
|
| 39 |
+// 'Account/MAXXXXXXXXXXXXXXXXXX/TollfreeVerification/', |
|
| 40 |
+// [ |
|
| 41 |
+// "number"=>"18554950186", |
|
| 42 |
+// "usecase"=>"2FA", |
|
| 43 |
+// "profile_uuid"=>"42f92135-6ec2-4110-8da4-71171f6aad44", |
|
| 44 |
+// "optin_type"=>"VERBAL", |
|
| 45 |
+// "volume"=> "100", |
|
| 46 |
+// "usecase_summary"=>"hbv", |
|
| 47 |
+// "message_sample"=> "message_sample", |
|
| 48 |
+// "callback_url"=> "https://plivobin-prod-usw1.plivops.com/1pcfjrt1", |
|
| 49 |
+// "callback_method"=> "POST", |
|
| 50 |
+// "optin_image_url"=> "http://google.com", |
|
| 51 |
+// "additional_information"=> "this is additional_information", |
|
| 52 |
+// "extra_data"=>"this is extra_data" |
|
| 53 |
+// |
|
| 54 |
+// ]); |
|
| 55 |
+// $body = file_get_contents(__DIR__ . '/../Mocks/tollfreeVerificationCreateResponse.json'); |
|
| 56 |
+// |
|
| 57 |
+// $this->mock(new PlivoResponse($request,201, $body)); |
|
| 58 |
+// |
|
| 59 |
+// $actual = $this->client->tollfreeVerification->create('18554950186', '2FA', '42f92135-6ec2-4110-8da4-71171f6aad44', 'VERBAL', '100', 'hbv', 'message_sample', 'http://google.com', "https://plivobin-prod-usw1.plivops.com/1pcfjrt1", "POST", "this is additional_information", "this is extra_data");
|
|
| 60 |
+// |
|
| 61 |
+// $this->assertRequest($request); |
|
| 62 |
+// |
|
| 63 |
+// self::assertNotNull($actual); |
|
| 64 |
+// } |
|
| 65 |
+ |
|
| 66 |
+} |
|
| 0 | 67 |
\ No newline at end of file |