alltube/tests/BaseTest.php
2019-04-21 19:14:23 +02:00

47 lines
850 B
PHP

<?php
/**
* PlaylistArchiveStreamTest class.
*/
namespace Alltube\Test;
use Alltube\Config;
use PHPUnit\Framework\TestCase;
/**
* Unit tests for the ViewFactory class.
*/
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();
}
}