Permalink
Browse files

Add tests for the camelize function.

  • Loading branch information...
1 parent bdf43c2 commit ff981aa86de49c6711ce02f71f762ca0b81e1585 Kevin Burke committed with brycied00d Dec 14, 2012
Showing with 24 additions and 0 deletions.
  1. +24 −0 tests/TwilioTest.php
View
@@ -13,6 +13,30 @@ function tearDown() {
m::close();
}
+ function testCamelize() {
+ $tests = array(
+ 'IncomingPhoneNumbers' => 'IncomingPhoneNumbers',
+ 'Applications' => 'Applications',
+ 'incoming_phone_numbers' => 'IncomingPhoneNumbers',
+ 'applications' => 'Applications',
+ );
+ foreach ($tests as $in => $out) {
+ $this->assertSame($out, Services_Twilio_Resource::camelize($in));
+ }
+ }
+
+ function testDecamelize() {
+ $tests = array(
+ 'IncomingPhoneNumbers' => 'incoming_phone_numbers',
+ 'Applications' => 'applications',
+ 'incoming_phone_numbers' => 'incoming_phone_numbers',
+ 'applications' => 'applications',
+ );
+ foreach ($tests as $in => $out) {
+ $this->assertSame($out, Services_Twilio_Resource::decamelize($in));
+ }
+ }
+
/**
* @dataProvider uriTestProvider
*/

0 comments on commit ff981aa

Please sign in to comment.