2015-10-31 14:42:25 +00:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* ConfigTest class
|
2016-08-01 11:29:13 +00:00
|
|
|
*/
|
2016-03-29 23:49:08 +00:00
|
|
|
namespace Alltube\Test;
|
|
|
|
|
2015-10-31 14:42:25 +00:00
|
|
|
use Alltube\Config;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Unit tests for the Config class
|
2016-08-01 11:29:13 +00:00
|
|
|
*/
|
2016-03-29 23:49:08 +00:00
|
|
|
class ConfigTest extends \PHPUnit_Framework_TestCase
|
2015-10-31 14:42:25 +00:00
|
|
|
{
|
2015-10-31 14:50:32 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Test the getInstance function
|
2016-02-28 22:04:53 +00:00
|
|
|
*
|
2015-10-31 14:50:32 +00:00
|
|
|
* @return void
|
|
|
|
*/
|
2015-10-31 14:42:25 +00:00
|
|
|
public function testGetInstance()
|
|
|
|
{
|
|
|
|
putenv('CONVERT=1');
|
|
|
|
$config = Config::getInstance();
|
|
|
|
$this->assertEquals($config->convert, true);
|
2016-07-29 22:47:46 +00:00
|
|
|
$this->assertInternalType('array', $config->curl_params);
|
|
|
|
$this->assertInternalType('array', $config->params);
|
|
|
|
$this->assertInternalType('string', $config->youtubedl);
|
|
|
|
$this->assertInternalType('string', $config->python);
|
|
|
|
$this->assertInternalType('string', $config->avconv);
|
|
|
|
$this->assertInternalType('string', $config->rtmpdump);
|
2015-10-31 14:42:25 +00:00
|
|
|
}
|
|
|
|
}
|