[ Index ] |
PHP Cross Reference of Phabricator |
[Summary view] [Print] [Text view]
1 <?php 2 3 use \Mockery as m; 4 5 class MediaTest extends PHPUnit_Framework_TestCase { 6 7 function testUseSpecialListKey() { 8 $http = m::mock(new Services_Twilio_TinyHttp); 9 $http->shouldReceive('get')->once() 10 ->with('/2010-04-01/Accounts/AC123/Messages/MM123/Media.json?Page=0&PageSize=50') 11 ->andReturn(array(200, array('Content-Type' => 'application/json'), 12 json_encode(array( 13 'end' => '0', 14 'total' => '2', 15 'media_list' => array( 16 array('sid' => 'ME123'), 17 array('sid' => 'ME456') 18 ), 19 'next_page_uri' => 'null', 20 'start' => 0 21 )) 22 )); 23 $client = new Services_Twilio('AC123', '123', '2010-04-01', $http); 24 $media_list = $client->account->messages->get('MM123')->media->getPage()->getItems(); 25 $this->assertEquals(count($media_list), 2); 26 } 27 28 }
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 |