From d5e6084ce25bdce75c3a9fdf1ddb83dfa55fd066 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Sun, 3 Dec 2023 08:45:49 +1100 Subject: [PATCH] Update domain checklist --- app/DataProviders/Domains.php | 59398 +++++++++++++++++++++++++++ app/Jobs/Account/CreateAccount.php | 6147 +-- tests/Unit/DomainCheckTest.php | 35 + 3 files changed, 59451 insertions(+), 6129 deletions(-) create mode 100644 app/DataProviders/Domains.php create mode 100644 tests/Unit/DomainCheckTest.php diff --git a/app/DataProviders/Domains.php b/app/DataProviders/Domains.php new file mode 100644 index 000000000000..814baeebad0f --- /dev/null +++ b/app/DataProviders/Domains.php @@ -0,0 +1,59398 @@ +hosted_company_count = config('ninja.quotas.free.max_companies'); $sp794f3f->account_sms_verified = true; - if (in_array($this->getDomain($this->request['email']), $this->domains)) { + if (in_array($this->getDomain($this->request['email']), Domains::getDomains())) { $sp794f3f->account_sms_verified = false; } diff --git a/tests/Unit/DomainCheckTest.php b/tests/Unit/DomainCheckTest.php new file mode 100644 index 000000000000..81bf7fd07757 --- /dev/null +++ b/tests/Unit/DomainCheckTest.php @@ -0,0 +1,35 @@ +assertTrue(in_array('yopmail.com', Domains::getDomains())); + $this->assertFalse(in_array('invoiceninja.com', Domains::getDomains())); + + } +}