Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
Merge branch 'release-2.0.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
Rudloff committed Apr 28, 2019
2 parents 40943b6 + 076241d commit a0811c6
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 4 deletions.
2 changes: 1 addition & 1 deletion classes/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,6 @@ private function __construct(array $options = [])
{
$this->applyOptions($options);
$this->getEnv();
$this->validateOptions();
}

/**
Expand Down Expand Up @@ -216,6 +215,7 @@ public static function setFile($file)
if (is_file($file)) {
$options = Yaml::parse(file_get_contents($file));
self::$instance = new self($options);
self::$instance->validateOptions();
} else {
throw new Exception("Can't find config file at ".$file);
}
Expand Down
4 changes: 2 additions & 2 deletions classes/streams/YoutubeChunkStream.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,11 @@ public function __toString()
/**
* Closes the stream and any underlying resources.
*
* @return mixed
* @return void
*/
public function close()
{
return $this->response->getBody()->close();
$this->response->getBody()->close();
}

/**
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "alltube",
"description": "HTML GUI for youtube-dl",
"version": "2.0.0",
"version": "2.0.1",
"author": "Pierre Rudloff",
"bugs": "https://github.com/Rudloff/alltube/issues",
"dependencies": {
Expand Down
14 changes: 14 additions & 0 deletions tests/ConfigTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,20 @@ public function testGetInstance()
$this->assertConfig($config);
}

/**
* Test the getInstance function.
*
* @return void
*/
public function testGetInstanceFromScratch()
{
Config::destroyInstance();

$config = Config::getInstance();
$this->assertEquals($config->convert, false);
$this->assertConfig($config);
}

/**
* Assert that a Config object is correctly instantiated.
*
Expand Down

0 comments on commit a0811c6

Please sign in to comment.