core/modules/config/src/Tests/ConfigDependencyWebTest.php | 2 +- core/modules/config/src/Tests/ConfigEntityFormOverrideTest.php | 2 +- core/modules/config/src/Tests/ConfigEntityListTest.php | 4 +++- core/modules/config/src/Tests/ConfigEntityStatusUITest.php | 2 ++ core/modules/config/src/Tests/ConfigEntityTest.php | 2 +- core/modules/config/src/Tests/SchemaConfigListenerWebTest.php | 2 ++ 6 files changed, 10 insertions(+), 4 deletions(-) diff --git a/core/modules/config/src/Tests/ConfigDependencyWebTest.php b/core/modules/config/src/Tests/ConfigDependencyWebTest.php index 7cc973d..24d2a15 100644 --- a/core/modules/config/src/Tests/ConfigDependencyWebTest.php +++ b/core/modules/config/src/Tests/ConfigDependencyWebTest.php @@ -35,7 +35,7 @@ class ConfigDependencyWebTest extends WebTestBase { * @see \Drupal\Core\Config\Entity\ConfigDependencyDeleteFormTrait */ function testConfigDependencyDeleteFormTrait() { - $this->drupalLogin($this->rootUser); + $this->drupalLogin($this->drupalCreateUser(['administer site configuration'])); /** @var \Drupal\Core\Config\Entity\ConfigEntityStorage $storage */ $storage = $this->container->get('entity.manager')->getStorage('config_test'); diff --git a/core/modules/config/src/Tests/ConfigEntityFormOverrideTest.php b/core/modules/config/src/Tests/ConfigEntityFormOverrideTest.php index ba268c1..a07da59 100644 --- a/core/modules/config/src/Tests/ConfigEntityFormOverrideTest.php +++ b/core/modules/config/src/Tests/ConfigEntityFormOverrideTest.php @@ -25,7 +25,7 @@ class ConfigEntityFormOverrideTest extends WebTestBase { * Tests that overrides do not affect forms or listing screens. */ public function testFormsWithOverrides() { - $this->drupalLogin($this->rootUser); + $this->drupalLogin($this->drupalCreateUser(['administer site configuration'])); $original_label = 'Default'; $overridden_label = 'Overridden label'; diff --git a/core/modules/config/src/Tests/ConfigEntityListTest.php b/core/modules/config/src/Tests/ConfigEntityListTest.php index 9287174..73571ce 100644 --- a/core/modules/config/src/Tests/ConfigEntityListTest.php +++ b/core/modules/config/src/Tests/ConfigEntityListTest.php @@ -153,7 +153,7 @@ function testList() { */ function testListUI() { // Log in as an administrative user to access the full menu trail. - $this->drupalLogin($this->drupalCreateUser(array('access administration pages'))); + $this->drupalLogin($this->drupalCreateUser(array('access administration pages', 'administer site configuration'))); // Get the list callback page. $this->drupalGet('admin/structure/config_test'); @@ -251,6 +251,8 @@ function testListUI() { * Test paging. */ public function testPager() { + $this->drupalLogin($this->drupalCreateUser(['administer site configuration'])); + $storage = \Drupal::entityManager()->getListBuilder('config_test')->getStorage(); // Create 51 test entities. diff --git a/core/modules/config/src/Tests/ConfigEntityStatusUITest.php b/core/modules/config/src/Tests/ConfigEntityStatusUITest.php index 7f7a29d..87ad9a1 100644 --- a/core/modules/config/src/Tests/ConfigEntityStatusUITest.php +++ b/core/modules/config/src/Tests/ConfigEntityStatusUITest.php @@ -28,6 +28,8 @@ class ConfigEntityStatusUITest extends WebTestBase { * Tests status operations. */ function testCRUD() { + $this->drupalLogin($this->drupalCreateUser(['administer site configuration'])); + $id = strtolower($this->randomMachineName()); $edit = array( 'id' => $id, diff --git a/core/modules/config/src/Tests/ConfigEntityTest.php b/core/modules/config/src/Tests/ConfigEntityTest.php index 8afef20..899ddd4 100644 --- a/core/modules/config/src/Tests/ConfigEntityTest.php +++ b/core/modules/config/src/Tests/ConfigEntityTest.php @@ -235,7 +235,7 @@ function testCRUD() { * Tests CRUD operations through the UI. */ function testCRUDUI() { - $this->drupalLogin($this->rootUser); + $this->drupalLogin($this->drupalCreateUser(['administer site configuration'])); $id = strtolower($this->randomMachineName()); $label1 = $this->randomMachineName(); diff --git a/core/modules/config/src/Tests/SchemaConfigListenerWebTest.php b/core/modules/config/src/Tests/SchemaConfigListenerWebTest.php index 1677214..65ca4c3 100644 --- a/core/modules/config/src/Tests/SchemaConfigListenerWebTest.php +++ b/core/modules/config/src/Tests/SchemaConfigListenerWebTest.php @@ -28,6 +28,8 @@ class SchemaConfigListenerWebTest extends WebTestBase { * Tests \Drupal\Core\Config\Testing\ConfigSchemaChecker. */ public function testConfigSchemaChecker() { + $this->drupalLogin($this->drupalCreateUser(['administer site configuration'])); + // Test a non-existing schema. $msg = 'Expected SchemaIncompleteException thrown'; try {