diff --git a/src/infrastructure/env/__tests__/PhabricatorEnvTestCase.php b/src/infrastructure/env/__tests__/PhabricatorEnvTestCase.php index 13b5d9c5e2..4828b0acb1 100644 --- a/src/infrastructure/env/__tests__/PhabricatorEnvTestCase.php +++ b/src/infrastructure/env/__tests__/PhabricatorEnvTestCase.php @@ -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); + } + }