OSS\Tests\LiveChannelXmlTest::testLiveChannelConfig PHP Метод

testLiveChannelConfig() публичный Метод

    public function testLiveChannelConfig()
    {
        $config = new LiveChannelConfig(array('name' => 'live-1'));
        $config->parseFromXml($this->config);
        $this->assertEquals('xxx', $config->getDescription());
        $this->assertEquals('enabled', $config->getStatus());
        $this->assertEquals('hls', $config->getType());
        $this->assertEquals(1000, $config->getFragDuration());
        $this->assertEquals(5, $config->getFragCount());
        $this->assertEquals('hello.m3u8', $config->getPlayListName());
        $xml = $config->serializeToXml();
        $config2 = new LiveChannelConfig(array('name' => 'live-2'));
        $config2->parseFromXml($xml);
        $this->assertEquals('xxx', $config2->getDescription());
        $this->assertEquals('enabled', $config2->getStatus());
        $this->assertEquals('hls', $config2->getType());
        $this->assertEquals(1000, $config2->getFragDuration());
        $this->assertEquals(5, $config2->getFragCount());
        $this->assertEquals('hello.m3u8', $config2->getPlayListName());
    }