refactor: New Video class
The news class provides a cleaner object-oriented logic BREAKING CHANGE: The VideoDownload class has been removed and the Config constructor is now private
This commit is contained in:
parent
feb8998188
commit
4c9af8ad1d
18 changed files with 665 additions and 719 deletions
42
tests/BaseTest.php
Normal file
42
tests/BaseTest.php
Normal file
|
@ -0,0 +1,42 @@
|
|||
<?php
|
||||
/**
|
||||
* PlaylistArchiveStreamTest class.
|
||||
*/
|
||||
|
||||
namespace Alltube\Test;
|
||||
|
||||
use Alltube\Config;
|
||||
use Alltube\Video;
|
||||
use Alltube\PlaylistArchiveStream;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use RuntimeException;
|
||||
use stdClass;
|
||||
|
||||
/**
|
||||
* Unit tests for the ViewFactory class.
|
||||
*/
|
||||
abstract class BaseTest extends TestCase
|
||||
{
|
||||
|
||||
/**
|
||||
* Prepare tests.
|
||||
*/
|
||||
protected function setUp()
|
||||
{
|
||||
if (PHP_OS == 'WINNT') {
|
||||
$configFile = 'config_test_windows.yml';
|
||||
} else {
|
||||
$configFile = 'config_test.yml';
|
||||
}
|
||||
|
||||
Config::setFile(__DIR__.'/../config/'.$configFile);
|
||||
}
|
||||
|
||||
/**
|
||||
* Destroy properties after test.
|
||||
*/
|
||||
protected function tearDown()
|
||||
{
|
||||
Config::destroyInstance();
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue