summaryrefslogtreecommitdiffstats
path: root/Twilio/Tests/Integration/Trunking/V1/Trunk/OriginationUrlTest.php
diff options
context:
space:
mode:
authormatt <matt@twilio.com>2016-08-29 10:39:08 -0700
committermatt <matt@twilio.com>2016-08-29 10:39:08 -0700
commitbcf66baa81d5412fec65bf46f81435e59f3fadde (patch)
tree2a01ddaa7245e3ac913edc9bd4fc1cba2b0d3e71 /Twilio/Tests/Integration/Trunking/V1/Trunk/OriginationUrlTest.php
parent1b5fe25928f904846d58d914bc259dc9865ab9fd (diff)
downloadtwilio-php-origin/urlencode-url-parts.zip
twilio-php-origin/urlencode-url-parts.tar.gz
twilio-php-origin/urlencode-url-parts.tar.bz2
rawurlencode solution arguments before interpolationorigin/urlencode-url-parts
- URL segments are generally sids, but in the case that they are phone numbers or sid-likes, they should be `rawurlencode()`d - Updates the Holodeck assertions so they produce better failure messages. - Updates appropriate tests to assert correct behavior.
Diffstat (limited to 'Twilio/Tests/Integration/Trunking/V1/Trunk/OriginationUrlTest.php')
-rw-r--r--Twilio/Tests/Integration/Trunking/V1/Trunk/OriginationUrlTest.php22
1 files changed, 11 insertions, 11 deletions
diff --git a/Twilio/Tests/Integration/Trunking/V1/Trunk/OriginationUrlTest.php b/Twilio/Tests/Integration/Trunking/V1/Trunk/OriginationUrlTest.php
index c308ad2..881b11c 100644
--- a/Twilio/Tests/Integration/Trunking/V1/Trunk/OriginationUrlTest.php
+++ b/Twilio/Tests/Integration/Trunking/V1/Trunk/OriginationUrlTest.php
@@ -25,10 +25,10 @@ class OriginationUrlTest extends HolodeckTestCase {
} catch (DeserializeException $e) {}
catch (TwilioException $e) {}
- $this->assertTrue($this->holodeck->hasRequest(new Request(
+ $this->assertRequest(new Request(
'get',
'https://trunking.twilio.com/v1/Trunks/TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/OriginationUrls/OUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'
- )));
+ ));
}
public function testFetchResponse() {
@@ -66,10 +66,10 @@ class OriginationUrlTest extends HolodeckTestCase {
} catch (DeserializeException $e) {}
catch (TwilioException $e) {}
- $this->assertTrue($this->holodeck->hasRequest(new Request(
+ $this->assertRequest(new Request(
'delete',
'https://trunking.twilio.com/v1/Trunks/TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/OriginationUrls/OUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'
- )));
+ ));
}
public function testDeleteResponse() {
@@ -101,12 +101,12 @@ class OriginationUrlTest extends HolodeckTestCase {
'SipUrl' => "https://example.com",
);
- $this->assertTrue($this->holodeck->hasRequest(new Request(
+ $this->assertRequest(new Request(
'post',
'https://trunking.twilio.com/v1/Trunks/TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/OriginationUrls',
null,
$values
- )));
+ ));
}
public function testCreateResponse() {
@@ -144,10 +144,10 @@ class OriginationUrlTest extends HolodeckTestCase {
} catch (DeserializeException $e) {}
catch (TwilioException $e) {}
- $this->assertTrue($this->holodeck->hasRequest(new Request(
+ $this->assertRequest(new Request(
'get',
'https://trunking.twilio.com/v1/Trunks/TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/OriginationUrls'
- )));
+ ));
}
public function testReadFullResponse() {
@@ -186,7 +186,7 @@ class OriginationUrlTest extends HolodeckTestCase {
$actual = $this->twilio->trunking->v1->trunks("TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
->originationUrls->read();
- $this->assertTrue(count($actual) > 0);
+ $this->assertGreaterThan(0, count($actual));
}
public function testReadEmptyResponse() {
@@ -223,10 +223,10 @@ class OriginationUrlTest extends HolodeckTestCase {
} catch (DeserializeException $e) {}
catch (TwilioException $e) {}
- $this->assertTrue($this->holodeck->hasRequest(new Request(
+ $this->assertRequest(new Request(
'post',
'https://trunking.twilio.com/v1/Trunks/TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/OriginationUrls/OUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'
- )));
+ ));
}
public function testUpdateResponse() {