1
0
mirror of https://github.com/Rudloff/alltube.git synced 2024-06-25 07:27:46 +02:00
alltube/tests/YoutubeChunkStreamTest.php
Pierre Rudloff 5c2823e3f1 Move Video class to a separate library
+ improve error handling
+ youtube-dl update
2020-06-21 15:12:03 +02:00

36 lines
804 B
PHP

<?php
/**
* YoutubeChunkStreamTest class.
*/
namespace Alltube\Test;
use Alltube\Config;
use Alltube\Exception\ConfigException;
use Alltube\Library\Exception\AlltubeLibraryException;
use Alltube\Stream\YoutubeChunkStream;
/**
* Unit tests for the YoutubeChunkStream class.
* @requires download
*/
class YoutubeChunkStreamTest extends StreamTest
{
/**
* Prepare tests.
* @throws ConfigException
* @throws AlltubeLibraryException
*/
protected function setUp(): void
{
parent::setUp();
$config = Config::getInstance();
$downloader = $config->getDownloader();
$video = $downloader->getVideo('https://www.youtube.com/watch?v=dQw4w9WgXcQ');
$this->stream = new YoutubeChunkStream($downloader->getHttpResponse($video));
}
}