diff --git a/core/modules/contact/src/Tests/ContactPersonalTest.php b/core/modules/contact/src/Tests/ContactPersonalTest.php index 8426b4a..8859b16 100644 --- a/core/modules/contact/src/Tests/ContactPersonalTest.php +++ b/core/modules/contact/src/Tests/ContactPersonalTest.php @@ -223,11 +223,16 @@ function testPersonalContactAccess() { $this->assertResponse(200); // Test "Enable by default" for existing users. - $this->moduleInstaller()->uninstall(['contact']); + $this->drupalLogin($this->adminUser); + $this->container->get('module_installer')->uninstall(['contact']); $this->contactUserPreEnable = $this->drupalCreateUser(); - $this->moduleInstaller()->install(['contact']); - $edit = ['contact_default_status' => FALSE, 'contact_default_scope' => 1]; + $this->container->get('module_installer')->install(['contact']); + $edit = ['contact_default_status' => TRUE, 'contact_default_scope' => 1]; $this->drupalPostForm('admin/config/people/accounts', $edit, t('Save configuration')); + $this->drupalLogin($this->webUser); + $this->drupalGet('user/' . $this->adminUser->id() . '/contact'); + $this->assertResponse(200); + $this->drupalLogin($this->webUser); $this->drupalGet('user/' . $this->contactUserPreEnable->id() . '/contact'); $this->assertResponse(200);