From 64ad44cffb24169278c0c57990722dd42020da47 Mon Sep 17 00:00:00 2001 From: lkassianik Date: Tue, 10 Nov 2015 10:09:14 -0800 Subject: [PATCH] Always override `auth.email-domains` when running unit tests Summary: Fixes T9689, Always override `auth.email-domains` when running unit tests Test Plan: - Set `auth.email-domains` - Run `arc unit --everything`. Observe no errors. Reviewers: #blessed_reviewers, epriestley Reviewed By: #blessed_reviewers, epriestley Subscribers: Korvin Maniphest Tasks: T9689 Differential Revision: https://secure.phabricator.com/D14456 --- .../controller/__tests__/PhabricatorAccessControlTestCase.php | 1 - src/infrastructure/testing/PhabricatorTestCase.php | 4 ++++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/applications/base/controller/__tests__/PhabricatorAccessControlTestCase.php b/src/applications/base/controller/__tests__/PhabricatorAccessControlTestCase.php index 560e0c95c4..27e716556e 100644 --- a/src/applications/base/controller/__tests__/PhabricatorAccessControlTestCase.php +++ b/src/applications/base/controller/__tests__/PhabricatorAccessControlTestCase.php @@ -56,7 +56,6 @@ final class PhabricatorAccessControlTestCase extends PhabricatorTestCase { $env->overrideEnvConfig('phabricator.base-uri', 'http://'.$host); $env->overrideEnvConfig('policy.allow-public', false); $env->overrideEnvConfig('auth.require-email-verification', false); - $env->overrideEnvConfig('auth.email-domains', array()); $env->overrideEnvConfig('security.require-multi-factor-auth', false); diff --git a/src/infrastructure/testing/PhabricatorTestCase.php b/src/infrastructure/testing/PhabricatorTestCase.php index 32fe4f3bee..068c2ed557 100644 --- a/src/infrastructure/testing/PhabricatorTestCase.php +++ b/src/infrastructure/testing/PhabricatorTestCase.php @@ -120,6 +120,10 @@ abstract class PhabricatorTestCase extends PhutilTestCase { 'phabricator.base-uri', 'http://phabricator.example.com'); + $this->env->overrideEnvConfig( + 'auth.email-domains', + array()); + // Tests do their own stubbing/voiding for events. $this->env->overrideEnvConfig('phabricator.silent', false); }