mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-10 08:52:39 +01:00
Testing that PhabricatorEnv::getEnvConfig throws an exception if config option is not found.
Summary: Unit test for T2345 Test Plan: Ran unit tests, checked that it passed. Reviewers: epriestley Reviewed By: epriestley CC: aran, Korvin Differential Revision: https://secure.phabricator.com/D4552
This commit is contained in:
parent
bb175655ae
commit
f0682941b6
1 changed files with 18 additions and 0 deletions
|
@ -156,4 +156,22 @@ final class PhabricatorEnvTestCase extends PhabricatorTestCase {
|
|||
unset($outer);
|
||||
}
|
||||
|
||||
public function testGetEnvExceptions() {
|
||||
$caught = null;
|
||||
try {
|
||||
PhabricatorEnv::getEnvConfig("not.a.real.config.option");
|
||||
} catch (Exception $ex) {
|
||||
$caught = $ex;
|
||||
}
|
||||
$this->assertEqual(true, $caught instanceof Exception);
|
||||
|
||||
$caught = null;
|
||||
try {
|
||||
PhabricatorEnv::getEnvConfig("test.value");
|
||||
} catch (Exception $ex) {
|
||||
$caught = $ex;
|
||||
}
|
||||
$this->assertEqual(false, $caught instanceof Exception);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue