Skip to content

Commit

Permalink
Tests 2020-03-16 (#25)
Browse files Browse the repository at this point in the history
* Update ApiRequestor.php

Fixed params for isset()

* Added OutboundVoiceProfile

Added OutboundVoiceProfile

* Create OutboundVoiceProfileTest.php

Create OutboundVoiceProfileTest.php

* Updated Tests

Updated Tests
  • Loading branch information
weroh committed Mar 16, 2020
1 parent 52a5d19 commit cb230b4
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 47 deletions.
30 changes: 0 additions & 30 deletions tests/api_resources/AlphanumericSenderIDTest.php

This file was deleted.

4 changes: 1 addition & 3 deletions tests/api_resources/AvailablePhoneNumberTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@ public function testIsListable()
);
$resources = AvailablePhoneNumber::all([
'filter' => [
"limit" => 1,
"features" => ["sms", "mms"],
"phone_number" => ["contains" => "555"],
"phone_number" => ["starts_with" => "555"],
]
]);
$this->assertInstanceOf(\Telnyx\Collection::class, $resources);
Expand Down
2 changes: 1 addition & 1 deletion tests/api_resources/ConnectionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public function testIsListable()
);
$resources = Connection::all();
$this->assertInstanceOf(\Telnyx\Collection::class, $resources);
$this->assertInstanceOf(\Telnyx\Connection::class, $resources[0]);
$this->assertInstanceOf(\Telnyx\IPConnection::class, $resources[0]);
}

public function testIsRetrievable()
Expand Down
14 changes: 1 addition & 13 deletions tests/api_resources/MessagingProfileTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public function testIsCreatable()
'post',
'/v2/messaging_profiles'
);
$resource = MessagingProfile::create(["country" => "US", "type" => "custom"]);
$resource = MessagingProfile::create(["name" => "Summer Campaign"]);
$this->assertInstanceOf(\Telnyx\MessagingProfile::class, $resource);
}

Expand Down Expand Up @@ -86,16 +86,4 @@ public function testCanCallShortCodes()
$this->assertInstanceOf(\Telnyx\ShortCode::class, $resources[0]);
}


public function testCanCallAlphanumericSenderIds()
{
$messaging_profile = MessagingProfile::retrieve(self::TEST_RESOURCE_ID);
$this->expectsRequest(
'get',
'/v2/messaging_profiles/' . urlencode(self::TEST_RESOURCE_ID) . '/alphanumeric_sender_ids'
);
$resources = $messaging_profile->alphanumeric_sender_ids();
$this->assertInstanceOf(\Telnyx\MessagingProfile::class, $resources);
$this->assertInstanceOf(\Telnyx\AlphanumericSenderId::class, $resources[0]);
}
}

0 comments on commit cb230b4

Please sign in to comment.