Loading core/modules/system/tests/src/Functional/Bootstrap/DrupalMessengerServiceTest.php +2 −9 Original line number Diff line number Diff line Loading @@ -22,14 +22,6 @@ class DrupalMessengerServiceTest extends BrowserTestBase { */ protected static $modules = ['system_test']; /** * {@inheritdoc} * * @todo Remove and fix test to not rely on super user. * @see https://www.drupal.org/project/drupal/issues/3437620 */ protected bool $usesSuperUserAccessPolicy = TRUE; /** * {@inheritdoc} */ Loading Loading @@ -63,7 +55,8 @@ public function testDrupalMessengerService() { // Ensure messages survive a container rebuild. $assert = $this->assertSession(); $this->drupalLogin($this->rootUser); $this->drupalLogin($this->drupalCreateUser(['administer modules'])); $edit = []; $edit["modules[help][enable]"] = TRUE; $this->drupalGet('admin/modules'); Loading core/modules/system/tests/src/Functional/Entity/EntityReferenceFieldCreationTest.php +5 −9 Original line number Diff line number Diff line Loading @@ -23,14 +23,6 @@ class EntityReferenceFieldCreationTest extends BrowserTestBase { */ protected static $modules = ['entity_test', 'node', 'field_ui']; /** * {@inheritdoc} * * @todo Remove and fix test to not rely on super user. * @see https://www.drupal.org/project/drupal/issues/3437620 */ protected bool $usesSuperUserAccessPolicy = TRUE; /** * {@inheritdoc} */ Loading @@ -40,8 +32,12 @@ class EntityReferenceFieldCreationTest extends BrowserTestBase { * Tests that entity reference fields cannot target entity types without IDs. */ public function testAddReferenceFieldTargetingEntityTypeWithoutId() { $this->drupalLogin($this->rootUser); $node_type = $this->drupalCreateContentType()->id(); $this->drupalLogin($this->drupalCreateUser([ 'administer content types', 'administer node fields', ])); // Entity types without an ID key should not be presented as options when // creating an entity reference field in the UI. Loading core/modules/system/tests/src/Functional/File/FileSaveHtaccessLoggingTest.php +2 −9 Original line number Diff line number Diff line Loading @@ -19,14 +19,6 @@ class FileSaveHtaccessLoggingTest extends BrowserTestBase { */ protected static $modules = ['dblog']; /** * {@inheritdoc} * * @todo Remove and fix test to not rely on super user. * @see https://www.drupal.org/project/drupal/issues/3437620 */ protected bool $usesSuperUserAccessPolicy = TRUE; /** * {@inheritdoc} */ Loading @@ -45,7 +37,8 @@ public function testHtaccessSave() { /** @var \Drupal\Core\File\HtaccessWriterInterface $htaccess */ $htaccess = \Drupal::service('file.htaccess_writer'); $this->assertFalse($htaccess->write($private, TRUE)); $this->drupalLogin($this->rootUser); $this->drupalLogin($this->drupalCreateUser(['access site reports'])); $this->drupalGet('admin/reports/dblog'); $this->clickLink("Security warning: Couldn't write .htaccess file."); Loading core/modules/system/tests/src/Functional/Menu/LocalTasksTest.php +17 −9 Original line number Diff line number Diff line Loading @@ -24,14 +24,6 @@ class LocalTasksTest extends BrowserTestBase { */ protected static $modules = ['block', 'menu_test', 'entity_test', 'node']; /** * {@inheritdoc} * * @todo Remove and fix test to not rely on super user. * @see https://www.drupal.org/project/drupal/issues/3437620 */ protected bool $usesSuperUserAccessPolicy = TRUE; /** * {@inheritdoc} */ Loading Loading @@ -268,11 +260,16 @@ public function testLocalTaskBlock() { * Tests that local tasks blocks cache is invalidated correctly. */ public function testLocalTaskBlockCache() { $this->drupalLogin($this->rootUser); $this->drupalLogin($this->drupalCreateUser([ 'administer content types', 'administer permissions', ])); $this->drupalCreateContentType(['type' => 'page']); // Only the Edit task. The block avoids showing a single tab. $this->drupalGet('/admin/config/people/accounts'); // @@todo Add assertion here to check the page was actually visited. // https://www.drupal.org/project/drupal/issues/3443748 $this->assertNoLocalTasks(); // Only the Edit and Manage permission tabs. Loading @@ -284,6 +281,17 @@ public function testLocalTaskBlockCache() { // Field UI adds the usual Manage fields etc tabs. \Drupal::service('module_installer')->install(['field_ui']); $this->drupalLogin($this->drupalCreateUser([ 'administer content types', 'administer permissions', 'administer account settings', 'administer display modes', 'administer node display', 'administer node fields', 'administer node form display', ])); $this->drupalGet('/admin/structure/types/manage/page'); $this->assertLocalTasks([ ['entity.node_type.edit_form', ['node_type' => 'page']], Loading core/modules/system/tests/src/Functional/Module/ClassLoaderTest.php +5 −10 Original line number Diff line number Diff line Loading @@ -14,14 +14,6 @@ */ class ClassLoaderTest extends BrowserTestBase { /** * {@inheritdoc} * * @todo Remove and fix test to not rely on super user. * @see https://www.drupal.org/project/drupal/issues/3437620 */ protected bool $usesSuperUserAccessPolicy = TRUE; /** * The expected result from calling the module-provided class' method. * Loading Loading @@ -97,7 +89,8 @@ public function testClassLoadingDisabledModules() { * Ensures the negative caches in the class loader don't result in crashes. */ public function testMultipleModules() { $this->drupalLogin($this->rootUser); $this->drupalLogin($this->drupalCreateUser(['administer modules'])); $edit = [ "modules[module_install_class_loader_test1][enable]" => TRUE, "modules[module_install_class_loader_test2][enable]" => TRUE, Loading @@ -113,7 +106,9 @@ public function testMultipleModules() { */ public function testAutoloadFromModuleFile() { $this->assertFalse(defined('MODULE_AUTOLOAD_TEST_CONSTANT')); $this->drupalLogin($this->rootUser); // Create use with required permissions. $this->drupalLogin($this->drupalCreateUser(['administer modules'])); $edit = [ "modules[module_autoload_test][enable]" => TRUE, ]; Loading Loading
core/modules/system/tests/src/Functional/Bootstrap/DrupalMessengerServiceTest.php +2 −9 Original line number Diff line number Diff line Loading @@ -22,14 +22,6 @@ class DrupalMessengerServiceTest extends BrowserTestBase { */ protected static $modules = ['system_test']; /** * {@inheritdoc} * * @todo Remove and fix test to not rely on super user. * @see https://www.drupal.org/project/drupal/issues/3437620 */ protected bool $usesSuperUserAccessPolicy = TRUE; /** * {@inheritdoc} */ Loading Loading @@ -63,7 +55,8 @@ public function testDrupalMessengerService() { // Ensure messages survive a container rebuild. $assert = $this->assertSession(); $this->drupalLogin($this->rootUser); $this->drupalLogin($this->drupalCreateUser(['administer modules'])); $edit = []; $edit["modules[help][enable]"] = TRUE; $this->drupalGet('admin/modules'); Loading
core/modules/system/tests/src/Functional/Entity/EntityReferenceFieldCreationTest.php +5 −9 Original line number Diff line number Diff line Loading @@ -23,14 +23,6 @@ class EntityReferenceFieldCreationTest extends BrowserTestBase { */ protected static $modules = ['entity_test', 'node', 'field_ui']; /** * {@inheritdoc} * * @todo Remove and fix test to not rely on super user. * @see https://www.drupal.org/project/drupal/issues/3437620 */ protected bool $usesSuperUserAccessPolicy = TRUE; /** * {@inheritdoc} */ Loading @@ -40,8 +32,12 @@ class EntityReferenceFieldCreationTest extends BrowserTestBase { * Tests that entity reference fields cannot target entity types without IDs. */ public function testAddReferenceFieldTargetingEntityTypeWithoutId() { $this->drupalLogin($this->rootUser); $node_type = $this->drupalCreateContentType()->id(); $this->drupalLogin($this->drupalCreateUser([ 'administer content types', 'administer node fields', ])); // Entity types without an ID key should not be presented as options when // creating an entity reference field in the UI. Loading
core/modules/system/tests/src/Functional/File/FileSaveHtaccessLoggingTest.php +2 −9 Original line number Diff line number Diff line Loading @@ -19,14 +19,6 @@ class FileSaveHtaccessLoggingTest extends BrowserTestBase { */ protected static $modules = ['dblog']; /** * {@inheritdoc} * * @todo Remove and fix test to not rely on super user. * @see https://www.drupal.org/project/drupal/issues/3437620 */ protected bool $usesSuperUserAccessPolicy = TRUE; /** * {@inheritdoc} */ Loading @@ -45,7 +37,8 @@ public function testHtaccessSave() { /** @var \Drupal\Core\File\HtaccessWriterInterface $htaccess */ $htaccess = \Drupal::service('file.htaccess_writer'); $this->assertFalse($htaccess->write($private, TRUE)); $this->drupalLogin($this->rootUser); $this->drupalLogin($this->drupalCreateUser(['access site reports'])); $this->drupalGet('admin/reports/dblog'); $this->clickLink("Security warning: Couldn't write .htaccess file."); Loading
core/modules/system/tests/src/Functional/Menu/LocalTasksTest.php +17 −9 Original line number Diff line number Diff line Loading @@ -24,14 +24,6 @@ class LocalTasksTest extends BrowserTestBase { */ protected static $modules = ['block', 'menu_test', 'entity_test', 'node']; /** * {@inheritdoc} * * @todo Remove and fix test to not rely on super user. * @see https://www.drupal.org/project/drupal/issues/3437620 */ protected bool $usesSuperUserAccessPolicy = TRUE; /** * {@inheritdoc} */ Loading Loading @@ -268,11 +260,16 @@ public function testLocalTaskBlock() { * Tests that local tasks blocks cache is invalidated correctly. */ public function testLocalTaskBlockCache() { $this->drupalLogin($this->rootUser); $this->drupalLogin($this->drupalCreateUser([ 'administer content types', 'administer permissions', ])); $this->drupalCreateContentType(['type' => 'page']); // Only the Edit task. The block avoids showing a single tab. $this->drupalGet('/admin/config/people/accounts'); // @@todo Add assertion here to check the page was actually visited. // https://www.drupal.org/project/drupal/issues/3443748 $this->assertNoLocalTasks(); // Only the Edit and Manage permission tabs. Loading @@ -284,6 +281,17 @@ public function testLocalTaskBlockCache() { // Field UI adds the usual Manage fields etc tabs. \Drupal::service('module_installer')->install(['field_ui']); $this->drupalLogin($this->drupalCreateUser([ 'administer content types', 'administer permissions', 'administer account settings', 'administer display modes', 'administer node display', 'administer node fields', 'administer node form display', ])); $this->drupalGet('/admin/structure/types/manage/page'); $this->assertLocalTasks([ ['entity.node_type.edit_form', ['node_type' => 'page']], Loading
core/modules/system/tests/src/Functional/Module/ClassLoaderTest.php +5 −10 Original line number Diff line number Diff line Loading @@ -14,14 +14,6 @@ */ class ClassLoaderTest extends BrowserTestBase { /** * {@inheritdoc} * * @todo Remove and fix test to not rely on super user. * @see https://www.drupal.org/project/drupal/issues/3437620 */ protected bool $usesSuperUserAccessPolicy = TRUE; /** * The expected result from calling the module-provided class' method. * Loading Loading @@ -97,7 +89,8 @@ public function testClassLoadingDisabledModules() { * Ensures the negative caches in the class loader don't result in crashes. */ public function testMultipleModules() { $this->drupalLogin($this->rootUser); $this->drupalLogin($this->drupalCreateUser(['administer modules'])); $edit = [ "modules[module_install_class_loader_test1][enable]" => TRUE, "modules[module_install_class_loader_test2][enable]" => TRUE, Loading @@ -113,7 +106,9 @@ public function testMultipleModules() { */ public function testAutoloadFromModuleFile() { $this->assertFalse(defined('MODULE_AUTOLOAD_TEST_CONSTANT')); $this->drupalLogin($this->rootUser); // Create use with required permissions. $this->drupalLogin($this->drupalCreateUser(['administer modules'])); $edit = [ "modules[module_autoload_test][enable]" => TRUE, ]; Loading