Stop using a singleton for Config (#298)
This commit is contained in:
parent
6fc294afbe
commit
7e2afd8221
14 changed files with 87 additions and 169 deletions
|
@ -6,6 +6,9 @@
|
|||
|
||||
namespace Alltube\Test;
|
||||
|
||||
use Alltube\Config;
|
||||
use Alltube\Exception\ConfigException;
|
||||
use Alltube\Library\Downloader;
|
||||
use Psr\Http\Message\StreamInterface;
|
||||
use RuntimeException;
|
||||
|
||||
|
@ -20,6 +23,25 @@ abstract class StreamTest extends BaseTest
|
|||
*/
|
||||
protected $stream;
|
||||
|
||||
/**
|
||||
* Downloader class instance.
|
||||
* @var Downloader
|
||||
*/
|
||||
protected $downloader;
|
||||
|
||||
/**
|
||||
* Prepare tests.
|
||||
* @throws ConfigException
|
||||
*/
|
||||
protected function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
// So ffmpeg does not spam the output with broken pipe errors.
|
||||
$config = new Config(['ffmpegVerbosity' => 'fatal']);
|
||||
$this->downloader = $config->getDownloader();
|
||||
}
|
||||
|
||||
/**
|
||||
* Clean variables used in tests.
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue