config = Config::getInstance('config/'.$configFile); $this->download = new VideoDownload($this->config); $this->url = 'https://www.youtube.com/watch?v=XJC9_JkzugE'; } /** * Remove stubs. * * @return void */ protected function tearDown() { Mockery::close(); } /** * Test getAudioStream function with a buggy popen. * * @return void * @expectedException Exception */ public function testGetAudioStreamWithPopenError() { $this->download->getAudioStream($this->url, 'best'); } /** * Test getM3uStream function with a buggy popen. * * @return void * @expectedException Exception */ public function testGetM3uStreamWithPopenError() { $this->download->getM3uStream($this->download->getJSON($this->url, 'best')); } /** * Test getRtmpStream function with a buggy popen. * * @return void * @expectedException Exception */ public function testGetRtmpStreamWithPopenError() { $this->download->getRtmpStream($this->download->getJSON($this->url, 'best')); } /** * Test getRemuxStream function with a buggy popen. * * @return void * @expectedException Exception */ public function testGetRemuxStreamWithPopenError() { $this->download->getRemuxStream([$this->url, $this->url]); } /** * Test getConvertedStream function with a buggy popen. * * @return void * @expectedException Exception */ public function testGetConvertedStreamWithPopenError() { $this->download->getConvertedStream($this->url, 'best', 32, 'flv'); } }