[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: AccountTest.php
<?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Tests\Integration\Api\V2010; use Twilio\Exceptions\DeserializeException; use Twilio\Exceptions\TwilioException; use Twilio\Http\Response; use Twilio\Tests\HolodeckTestCase; use Twilio\Tests\Request; class AccountTest extends HolodeckTestCase { public function testCreateRequest() { $this->holodeck->mock(new Response(500, '')); try { $this->twilio->api->v2010->accounts->create(); } catch (DeserializeException $e) {} catch (TwilioException $e) {} $this->assertRequest(new Request( 'post', 'https://api.twilio.com/2010-04-01/Accounts.json' )); } public function testCreateResponse() { $this->holodeck->mock(new Response( 201, ' { "auth_token": "AUTHTOKEN", "date_created": "Sun, 15 Mar 2009 02:08:47 +0000", "date_updated": "Wed, 25 Aug 2010 01:30:09 +0000", "friendly_name": "Test Account", "sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "owner_account_sid": "ACbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", "status": "active", "subresource_uris": { "available_phone_numbers": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/AvailablePhoneNumbers.json", "calls": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Calls.json", "conferences": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conferences.json", "incoming_phone_numbers": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IncomingPhoneNumbers.json", "notifications": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Notifications.json", "outgoing_caller_ids": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/OutgoingCallerIds.json", "recordings": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Recordings.json", "sandbox": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Sandbox.json", "sms_messages": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/SMS/Messages.json", "transcriptions": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Transcriptions.json" }, "type": "Full", "uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json" } ' )); $actual = $this->twilio->api->v2010->accounts->create(); $this->assertNotNull($actual); } public function testFetchRequest() { $this->holodeck->mock(new Response(500, '')); try { $this->twilio->api->v2010->accounts("ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")->fetch(); } catch (DeserializeException $e) {} catch (TwilioException $e) {} $this->assertRequest(new Request( 'get', 'https://api.twilio.com/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json' )); } public function testFetchResponse() { $this->holodeck->mock(new Response( 200, ' { "auth_token": "AUTHTOKEN", "date_created": "Sun, 15 Mar 2009 02:08:47 +0000", "date_updated": "Wed, 25 Aug 2010 01:30:09 +0000", "friendly_name": "Test Account", "sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "owner_account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "status": "active", "subresource_uris": { "available_phone_numbers": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/AvailablePhoneNumbers.json", "calls": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Calls.json", "conferences": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conferences.json", "incoming_phone_numbers": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IncomingPhoneNumbers.json", "notifications": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Notifications.json", "outgoing_caller_ids": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/OutgoingCallerIds.json", "recordings": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Recordings.json", "sandbox": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Sandbox.json", "sms_messages": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/SMS/Messages.json", "transcriptions": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Transcriptions.json" }, "type": "Full", "uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json" } ' )); $actual = $this->twilio->api->v2010->accounts("ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")->fetch(); $this->assertNotNull($actual); } public function testReadRequest() { $this->holodeck->mock(new Response(500, '')); try { $this->twilio->api->v2010->accounts->read(); } catch (DeserializeException $e) {} catch (TwilioException $e) {} $this->assertRequest(new Request( 'get', 'https://api.twilio.com/2010-04-01/Accounts.json' )); } public function testReadFullResponse() { $this->holodeck->mock(new Response( 200, ' { "accounts": [ { "auth_token": "foobar", "date_created": "Tue, 23 Aug 2011 20:58:45 +0000", "date_updated": "Fri, 04 Sep 2015 22:53:32 +0000", "friendly_name": "Sub account for testing requests authed with parent account", "owner_account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "status": "active", "subresource_uris": { "applications": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Applications.json", "authorized_connect_apps": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/AuthorizedConnectApps.json", "available_phone_numbers": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/AvailablePhoneNumbers.json", "calls": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Calls.json", "conferences": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conferences.json", "connect_apps": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ConnectApps.json", "incoming_phone_numbers": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IncomingPhoneNumbers.json", "media": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Media.json", "messages": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Messages.json", "notifications": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Notifications.json", "outgoing_caller_ids": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/OutgoingCallerIds.json", "queues": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Queues.json", "recordings": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Recordings.json", "sandbox": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Sandbox.json", "sip": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/SIP.json", "sms_messages": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/SMS/Messages.json", "transcriptions": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Transcriptions.json", "usage": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Usage.json" }, "type": "Full", "uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json" } ], "end": 0, "first_page_uri": "/2010-04-01/Accounts.json?PageSize=1&Page=0", "last_page_uri": "/2010-04-01/Accounts.json?PageSize=1&Page=4", "next_page_uri": null, "num_pages": 5, "page": 0, "page_size": 1, "previous_page_uri": null, "start": 0, "total": 5, "uri": "/2010-04-01/Accounts.json?PageSize=1" } ' )); $actual = $this->twilio->api->v2010->accounts->read(); $this->assertGreaterThan(0, count($actual)); } public function testReadEmptyResponse() { $this->holodeck->mock(new Response( 200, ' { "accounts": [], "end": 0, "first_page_uri": "/2010-04-01/Accounts.json?PageSize=1&Page=0", "last_page_uri": "/2010-04-01/Accounts.json?PageSize=1&Page=4", "next_page_uri": null, "num_pages": 5, "page": 0, "page_size": 1, "previous_page_uri": null, "start": 0, "total": 5, "uri": "/2010-04-01/Accounts.json?PageSize=1" } ' )); $actual = $this->twilio->api->v2010->accounts->read(); $this->assertNotNull($actual); } public function testUpdateRequest() { $this->holodeck->mock(new Response(500, '')); try { $this->twilio->api->v2010->accounts("ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")->update(); } catch (DeserializeException $e) {} catch (TwilioException $e) {} $this->assertRequest(new Request( 'post', 'https://api.twilio.com/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json' )); } public function testUpdateResponse() { $this->holodeck->mock(new Response( 200, ' { "auth_token": "AUTHTOKEN", "date_created": "Sun, 15 Mar 2009 02:08:47 +0000", "date_updated": "Wed, 25 Aug 2010 01:30:09 +0000", "friendly_name": "Test Account", "sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "owner_account_sid": "ACbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", "status": "active", "subresource_uris": { "available_phone_numbers": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/AvailablePhoneNumbers.json", "calls": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Calls.json", "conferences": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conferences.json", "incoming_phone_numbers": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IncomingPhoneNumbers.json", "notifications": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Notifications.json", "outgoing_caller_ids": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/OutgoingCallerIds.json", "recordings": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Recordings.json", "sandbox": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Sandbox.json", "sms_messages": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/SMS/Messages.json", "transcriptions": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Transcriptions.json" }, "type": "Full", "uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json" } ' )); $actual = $this->twilio->api->v2010->accounts("ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")->update(); $this->assertNotNull($actual); } }
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: server1.winmanyltd.com
Server IP: 203.161.60.52
PHP Version: 8.3.27
Server Software: Apache
System: Linux server1.winmanyltd.com 4.18.0-553.22.1.el8_10.x86_64 #1 SMP Tue Sep 24 05:16:59 EDT 2024 x86_64
HDD Total: 117.98 GB
HDD Free: 59.81 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Enabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes (py3)
gcc:
Yes
pkexec:
Yes
git:
Yes
User Info
Username: eliosofonline
User ID (UID): 1002
Group ID (GID): 1003
Script Owner UID: 1002
Current Dir Owner: 1002