Skip to content

Commit

Permalink
Add tests for the camelize function.
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevin Burke authored and brycied00d committed Dec 14, 2012
1 parent bdf43c2 commit ff981aa
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions tests/TwilioTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down

0 comments on commit ff981aa

Please sign in to comment.