Skip to content

Commit

Permalink
Merge pull request #12 from mbrevda/useCorrectOption
Browse files Browse the repository at this point in the history
Use correct option; add test for static loading
  • Loading branch information
josegonzalez committed Jan 16, 2015
2 parents a2d32ca + 88791d4 commit 88fb0bd
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/josegonzalez/Dotenv/Loader.php
Expand Up @@ -57,7 +57,7 @@ public static function load($options = null)
$dotenv = new \josegonzalez\Dotenv\Loader($filepath);

if (array_key_exists('raiseExceptions', $options)) {
$dotenv->raiseExceptions($options);
$dotenv->raiseExceptions($options['raiseExceptions']);
}

$dotenv->parse();
Expand Down
9 changes: 8 additions & 1 deletion tests/josegonzalez/Dotenv/LoaderTest.php
Expand Up @@ -232,5 +232,12 @@ public function testToServerRequireException()
public function testToArrayException()
{
$this->Loader->toArray();
}
}

public function testStaticMissingEnvNoExceptions()
{
josegonzalez\Dotenv\Loader::load(array(
'raiseExceptions' => false
));
}
}

0 comments on commit 88fb0bd

Please sign in to comment.