1
0
Fork 0
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:
Nick Pellegrino 2013-01-19 17:05:30 -08:00 committed by epriestley
parent bb175655ae
commit f0682941b6

View file

@ -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);
}
}