Don't concatenate in function declaration
This commit is contained in:
parent
1400f3e86a
commit
96a98ae846
2 changed files with 4 additions and 3 deletions
|
@ -93,8 +93,9 @@ class Config
|
|||
*
|
||||
* @return Config
|
||||
*/
|
||||
public static function getInstance($yamlfile = __DIR__.'/../config.yml')
|
||||
public static function getInstance($yamlfile = 'config.yml')
|
||||
{
|
||||
$yamlfile = __DIR__.'/../'.$yamlfile;
|
||||
if (is_null(self::$instance) || self::$instance->file != $yamlfile) {
|
||||
self::$instance = new Config($yamlfile);
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@ class ConfigTest extends \PHPUnit_Framework_TestCase
|
|||
|
||||
protected function setUp()
|
||||
{
|
||||
$this->config = Config::getInstance(__DIR__.'/../config_test.yml');
|
||||
$this->config = Config::getInstance('config_test.yml');
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -39,7 +39,7 @@ class ConfigTest extends \PHPUnit_Framework_TestCase
|
|||
{
|
||||
putenv('CONVERT=1');
|
||||
Config::destroyInstance();
|
||||
$config = Config::getInstance(__DIR__.'/../config_test.yml');
|
||||
$config = Config::getInstance('config_test.yml');
|
||||
$this->assertEquals($config->convert, true);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue