[ Index ] |
PHP Cross Reference of Phabricator |
[Summary view] [Print] [Text view]
1 <?php 2 3 use \Mockery as m; 4 5 class ShortCodesTest extends PHPUnit_Framework_TestCase { 6 7 function testShortcodeResource() { 8 $http = m::mock(new Services_Twilio_TinyHttp); 9 $http->shouldReceive('get')->once() 10 ->with('/2010-04-01/Accounts/AC123/SMS/ShortCodes/SC123.json') 11 ->andReturn(array(200, array('Content-Type' => 'application/json'), 12 json_encode(array('sid' => 'SC123', 'short_code' => '1234')) 13 )); 14 $client = new Services_Twilio('AC123', '123', '2010-04-01', $http); 15 $sms = $client->account->short_codes->get('SC123'); 16 $this->assertSame('1234', $sms->short_code); 17 } 18 } 19
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Sun Nov 30 09:20:46 2014 | Cross-referenced by PHPXref 0.7.1 |