diff options
author | matt <matt@twilio.com> | 2016-08-29 10:39:08 -0700 |
---|---|---|
committer | matt <matt@twilio.com> | 2016-08-29 10:39:08 -0700 |
commit | bcf66baa81d5412fec65bf46f81435e59f3fadde (patch) | |
tree | 2a01ddaa7245e3ac913edc9bd4fc1cba2b0d3e71 /Twilio/Tests/Integration/IpMessaging/V1/Service/UserTest.php | |
parent | 1b5fe25928f904846d58d914bc259dc9865ab9fd (diff) | |
download | twilio-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/IpMessaging/V1/Service/UserTest.php')
-rw-r--r-- | Twilio/Tests/Integration/IpMessaging/V1/Service/UserTest.php | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/Twilio/Tests/Integration/IpMessaging/V1/Service/UserTest.php b/Twilio/Tests/Integration/IpMessaging/V1/Service/UserTest.php index 2a4f5eb..ada0643 100644 --- a/Twilio/Tests/Integration/IpMessaging/V1/Service/UserTest.php +++ b/Twilio/Tests/Integration/IpMessaging/V1/Service/UserTest.php @@ -25,10 +25,10 @@ class UserTest extends HolodeckTestCase { } catch (DeserializeException $e) {} catch (TwilioException $e) {} - $this->assertTrue($this->holodeck->hasRequest(new Request( + $this->assertRequest(new Request( 'get', 'https://ip-messaging.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Users/USaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' - ))); + )); } public function testFetchResponse() { @@ -65,10 +65,10 @@ class UserTest extends HolodeckTestCase { } catch (DeserializeException $e) {} catch (TwilioException $e) {} - $this->assertTrue($this->holodeck->hasRequest(new Request( + $this->assertRequest(new Request( 'delete', 'https://ip-messaging.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Users/USaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' - ))); + )); } public function testDeleteResponse() { @@ -97,12 +97,12 @@ class UserTest extends HolodeckTestCase { 'RoleSid' => "RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", ); - $this->assertTrue($this->holodeck->hasRequest(new Request( + $this->assertRequest(new Request( 'post', 'https://ip-messaging.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Users', null, $values - ))); + )); } public function testCreateResponse() { @@ -139,10 +139,10 @@ class UserTest extends HolodeckTestCase { } catch (DeserializeException $e) {} catch (TwilioException $e) {} - $this->assertTrue($this->holodeck->hasRequest(new Request( + $this->assertRequest(new Request( 'get', 'https://ip-messaging.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Users' - ))); + )); } public function testReadFullResponse() { @@ -180,7 +180,7 @@ class UserTest extends HolodeckTestCase { $actual = $this->twilio->ipMessaging->v1->services("ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") ->users->read(); - $this->assertTrue(count($actual) > 0); + $this->assertGreaterThan(0, count($actual)); } public function testReadEmptyResponse() { @@ -217,10 +217,10 @@ class UserTest extends HolodeckTestCase { } catch (DeserializeException $e) {} catch (TwilioException $e) {} - $this->assertTrue($this->holodeck->hasRequest(new Request( + $this->assertRequest(new Request( 'post', 'https://ip-messaging.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Users/USaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' - ))); + )); } public function testUpdateResponse() { |