diff --git a/classes/Config.php b/classes/Config.php index 7d33665..69cb26b 100644 --- a/classes/Config.php +++ b/classes/Config.php @@ -65,10 +65,16 @@ class Config */ public $curl_params = array(); - private $configFile; + /** + * YAML config file path + * @var string + */ + private $file; /** * Config constructor + * + * @param string $yamlfile YAML config file path */ private function __construct($yamlfile) { @@ -91,6 +97,8 @@ class Config /** * Get singleton instance * + * @param string $yamlfile YAML config file name + * * @return Config */ public static function getInstance($yamlfile = 'config.yml') diff --git a/tests/ConfigTest.php b/tests/ConfigTest.php index 8ea8e84..6527ec3 100644 --- a/tests/ConfigTest.php +++ b/tests/ConfigTest.php @@ -12,8 +12,15 @@ use Alltube\Config; class ConfigTest extends \PHPUnit_Framework_TestCase { + /** + * Config class instance + * @var Config + */ private $config; + /** + * Prepare tests + */ protected function setUp() { $this->config = Config::getInstance('config_test.yml'); @@ -35,6 +42,10 @@ class ConfigTest extends \PHPUnit_Framework_TestCase $this->assertInternalType('string', $this->config->rtmpdump); } + /** + * Test the getInstance function with the CONVERT environment variable + * @return void + */ public function testGetInstanceWithEnv() { putenv('CONVERT=1');