1
0
mirror of https://github.com/Rudloff/alltube.git synced 2024-06-21 06:56:40 +02:00
alltube/tests/BaseTest.php
2019-04-22 16:51:48 +02:00

48 lines
847 B
PHP

<?php
/**
* PlaylistArchiveStreamTest class.
*/
namespace Alltube\Test;
use Alltube\Config;
use PHPUnit\Framework\TestCase;
/**
* Abstract class used by every test.
*/
abstract class BaseTest extends TestCase
{
/**
* Get the config file used in tests.
*
* @return string Path to file
*/
protected function getConfigFile()
{
if (PHP_OS == 'WINNT') {
$configFile = 'config_test_windows.yml';
} else {
$configFile = 'config_test.yml';
}
return __DIR__.'/../config/'.$configFile;
}
/**
* Prepare tests.
*/
protected function setUp()
{
Config::setFile($this->getConfigFile());
}
/**
* Destroy properties after test.
*/
protected function tearDown()
{
Config::destroyInstance();
}
}