diff --git a/tests/src/Kernel/ContentTypeHelperTest.php b/tests/src/Kernel/ContentTypeHelperTest.php index 0225ec6..0609a2d 100644 --- a/tests/src/Kernel/ContentTypeHelperTest.php +++ b/tests/src/Kernel/ContentTypeHelperTest.php @@ -63,6 +63,12 @@ class ContentTypeHelperTest extends GroupKernelTestBase { protected function setUp(): void { parent::setUp(); + // Set config that group_sites needs to run tests. + $this->config('group_sites.settings') + ->set('no_site_access_policy', 'group_sites.no_site_access_policy.do_nothing') + ->set('site_access_policy', 'group_sites.site_access_policy.single') + ->save(); + // You really don't want to install localgov_page or localgov_events in a // Kernel test! NodeType::create([ diff --git a/tests/src/Kernel/GroupDefaultContentTest.php b/tests/src/Kernel/GroupDefaultContentTest.php index 26848d4..4cf0b1d 100644 --- a/tests/src/Kernel/GroupDefaultContentTest.php +++ b/tests/src/Kernel/GroupDefaultContentTest.php @@ -56,6 +56,12 @@ class GroupDefaultContentTest extends GroupKernelTestBase { protected function setUp(): void { parent::setUp(); + // Set config that group_sites needs to run tests. + $this->config('group_sites.settings') + ->set('no_site_access_policy', 'group_sites.no_site_access_policy.do_nothing') + ->set('site_access_policy', 'group_sites.site_access_policy.single') + ->save(); + $this->installEntitySchema('group_content_menu'); $this->installSchema('node', 'node_access'); diff --git a/tests/src/Kernel/UserRoleTest.php b/tests/src/Kernel/UserRoleTest.php index c7f17f4..03a6ea4 100644 --- a/tests/src/Kernel/UserRoleTest.php +++ b/tests/src/Kernel/UserRoleTest.php @@ -22,6 +22,7 @@ class UserRoleTest extends GroupKernelTestBase { 'group', 'group_content_menu', 'group_sites', + 'group_sites_test', 'image', 'media', 'media_library', @@ -37,6 +38,13 @@ class UserRoleTest extends GroupKernelTestBase { protected function setUp(): void { parent::setUp(); + // Set config that group_sites needs to run tests. + $this->config('group_sites.settings') + ->set('context_provider', '@group_sites_test.hardcoded_group_context:group') + ->set('no_site_access_policy', 'group_sites.no_site_access_policy.do_nothing') + ->set('site_access_policy', 'group_sites.site_access_policy.single') + ->save(); + $this->installEntitySchema('group'); $this->installEntitySchema('group_relationship'); $this->installEntitySchema('user');