Differential D12806 Diff 30846 src/applications/people/editor/__tests__/PhabricatorUserEditorTestCase.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/people/editor/__tests__/PhabricatorUserEditorTestCase.php
| <?php | <?php | ||||
| final class PhabricatorUserEditorTestCase extends PhabricatorTestCase { | final class PhabricatorUserEditorTestCase extends PhabricatorTestCase { | ||||
| protected function getPhabricatorTestCaseConfiguration() { | protected function getPhabricatorTestCaseConfiguration() { | ||||
| return array( | return array( | ||||
| self::PHABRICATOR_TESTCONFIG_BUILD_STORAGE_FIXTURES => true, | self::PHABRICATOR_TESTCONFIG_BUILD_STORAGE_FIXTURES => true, | ||||
| ); | ); | ||||
| } | } | ||||
| public function testRegistrationEmailOK() { | public function testRegistrationEmailOK() { | ||||
| $env = PhabricatorEnv::beginScopedEnv(); | $env = PhabricatorEnv::beginScopedEnv(); | ||||
| $env->overrideEnvConfig('auth.email-domains', array('example.com')); | $env->overrideEnvConfig('auth.email-domains', array('example.com')); | ||||
| $this->registerUser( | $this->registerUser( | ||||
| 'PhabricatorUserEditorTestCaseOK', | 'PhabricatorUserEditorTestCaseOK', | ||||
| 'PhabricatorUserEditorTestCase@example.com'); | 'PhabricatorUserEditorTest@example.com'); | ||||
| $this->assertTrue(true); | $this->assertTrue(true); | ||||
| } | } | ||||
| public function testRegistrationEmailInvalid() { | public function testRegistrationEmailInvalid() { | ||||
| $env = PhabricatorEnv::beginScopedEnv(); | $env = PhabricatorEnv::beginScopedEnv(); | ||||
| $env->overrideEnvConfig('auth.email-domains', array('example.com')); | $env->overrideEnvConfig('auth.email-domains', array('example.com')); | ||||
| Show All 14 Lines | final class PhabricatorUserEditorTestCase extends PhabricatorTestCase { | ||||
| public function testRegistrationEmailDomain() { | public function testRegistrationEmailDomain() { | ||||
| $env = PhabricatorEnv::beginScopedEnv(); | $env = PhabricatorEnv::beginScopedEnv(); | ||||
| $env->overrideEnvConfig('auth.email-domains', array('example.com')); | $env->overrideEnvConfig('auth.email-domains', array('example.com')); | ||||
| $caught = null; | $caught = null; | ||||
| try { | try { | ||||
| $this->registerUser( | $this->registerUser( | ||||
| 'PhabricatorUserEditorTestCaseDomain', | 'PhabricatorUserEditorTestCaseDomain', | ||||
| 'PhabricatorUserEditorTestCase@whitehouse.gov'); | 'PhabricatorUserEditorTest@whitehouse.gov'); | ||||
| } catch (Exception $ex) { | } catch (Exception $ex) { | ||||
| $caught = $ex; | $caught = $ex; | ||||
| } | } | ||||
| $this->assertTrue($caught instanceof Exception); | $this->assertTrue($caught instanceof Exception); | ||||
| } | } | ||||
| public function testRegistrationEmailApplicationEmailCollide() { | public function testRegistrationEmailApplicationEmailCollide() { | ||||
| Show All 34 Lines | |||||