Esempio n. 1
0
 public function testDumpVersionLessThan3()
 {
     $m3u8 = DummyM3u8Factory::createM3u8(2);
     $dumper = new Dumper();
     $m3u8Content = $dumper->dump($m3u8);
     $this->assertEquals($m3u8Content, DummyM3u8Factory::createM3u8Content(2));
 }
Esempio n. 2
0
 public function testParserFromUri()
 {
     $uri = 'http://example.com/';
     $loader = $this->prophesize('Chrisyue\\PhpM3u8\\Loader\\LoaderInterface');
     $loader->load($uri)->shouldBeCalledTimes(1)->willReturn(DummyM3u8Factory::createM3u8Content());
     $parser = new Parser();
     $parser->setLoader($loader->reveal());
     $m3u8 = $parser->parseFromUri($uri);
     $this->assertEquals($m3u8, DummyM3u8Factory::createM3u8());
 }