public function testListLiveChannels()
{
$config = new LiveChannelConfig(array('description' => 'live channel 1', 'type' => 'HLS', 'fragDuration' => 10, 'fragCount' => 5, 'playListName' => 'hello.m3u8'));
$this->client->putBucketLiveChannel($this->bucketName, 'live-1', $config);
$config = new LiveChannelConfig(array('description' => 'live channel 2', 'type' => 'HLS', 'fragDuration' => 10, 'fragCount' => 5, 'playListName' => 'hello.m3u8'));
$this->client->putBucketLiveChannel($this->bucketName, 'live-2', $config);
$list = $this->client->listBucketLiveChannels($this->bucketName);
$this->assertEquals($this->bucketName, $list->getBucketName());
$this->assertEquals(false, $list->getIsTruncated());
$channels = $list->getChannelList();
$this->assertEquals(2, count($channels));
$chan1 = $channels[0];
$this->assertEquals('live-1', $chan1->getName());
$this->assertEquals('live channel 1', $chan1->getDescription());
$this->assertEquals(1, count($chan1->getPublishUrls()));
$this->assertEquals(1, count($chan1->getPlayUrls()));
$chan2 = $channels[1];
$this->assertEquals('live-2', $chan2->getName());
$this->assertEquals('live channel 2', $chan2->getDescription());
$this->assertEquals(1, count($chan2->getPublishUrls()));
$this->assertEquals(1, count($chan2->getPlayUrls()));
$list = $this->client->listBucketLiveChannels($this->bucketName, array('prefix' => 'live-', 'marker' => 'live-1', 'max-keys' => 10));
$channels = $list->getChannelList();
$this->assertEquals(1, count($channels));
$chan2 = $channels[0];
$this->assertEquals('live-2', $chan2->getName());
$this->assertEquals('live channel 2', $chan2->getDescription());
$this->assertEquals(1, count($chan2->getPublishUrls()));
$this->assertEquals(1, count($chan2->getPlayUrls()));
$this->client->deleteBucketLiveChannel($this->bucketName, 'live-1');
$this->client->deleteBucketLiveChannel($this->bucketName, 'live-2');
$list = $this->client->listBucketLiveChannels($this->bucketName, array('prefix' => 'live-'));
$this->assertEquals(0, count($list->getChannelList()));
}