public function testPutLiveChannelStatus()
{
$channelName = 'live-to-put-status';
$config = new LiveChannelConfig(array('description' => 'test live channel info', 'type' => 'HLS', 'fragDuration' => 10, 'fragCount' => 5, 'playListName' => 'hello.m3u8'));
$this->client->putBucketLiveChannel($this->bucketName, $channelName, $config);
$info = $this->client->getLiveChannelInfo($this->bucketName, $channelName);
$this->assertEquals('test live channel info', $info->getDescription());
$this->assertEquals('enabled', $info->getStatus());
$this->assertEquals('HLS', $info->getType());
$this->assertEquals(10, $info->getFragDuration());
$this->assertEquals(5, $info->getFragCount());
$this->assertEquals('playlist.m3u8', $info->getPlayListName());
$status = $this->client->getLiveChannelStatus($this->bucketName, $channelName);
$this->assertEquals('Idle', $status->getStatus());
$resp = $this->client->putLiveChannelStatus($this->bucketName, $channelName, "disabled");
$info = $this->client->getLiveChannelInfo($this->bucketName, $channelName);
$this->assertEquals('test live channel info', $info->getDescription());
$this->assertEquals('disabled', $info->getStatus());
$this->assertEquals('HLS', $info->getType());
$this->assertEquals(10, $info->getFragDuration());
$this->assertEquals(5, $info->getFragCount());
$this->assertEquals('playlist.m3u8', $info->getPlayListName());
$status = $this->client->getLiveChannelStatus($this->bucketName, $channelName);
//getLiveChannelInfo
$this->assertEquals('Disabled', $status->getStatus());
$this->client->deleteBucketLiveChannel($this->bucketName, $channelName);
$list = $this->client->listBucketLiveChannels($this->bucketName, array('prefix' => $channelName));
$this->assertEquals(0, count($list->getChannelList()));
}