Verified Commit cbad32ab authored by Alex Pott's avatar Alex Pott
Browse files

Issue #3439925 by simonbaese, smustgrave, vensires: Fix Core tests that rely...

Issue #3439925 by simonbaese, smustgrave, vensires: Fix Core tests that rely on UID1's super user behavior
parent 8474559c
Loading
Loading
Loading
Loading
Loading
+4 −9
Original line number Diff line number Diff line
@@ -26,14 +26,6 @@ class ClaroTest extends BrowserTestBase {
   */
  protected static $modules = ['dblog', 'shortcut', 'pager_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}
   */
@@ -55,7 +47,10 @@ public function testRegressionMissingElementsCss() {
   * Tests Claro's configuration schema.
   */
  public function testConfigSchema() {
    $this->drupalLogin($this->rootUser);
    $permissions = [
      'administer modules',
    ];
    $this->drupalLogin($this->drupalCreateUser($permissions));
    $this->drupalGet('admin/modules');
    $this->assertSession()->elementNotExists('css', '#block-claro-help');

+5 −9
Original line number Diff line number Diff line
@@ -27,21 +27,17 @@ class RouteProviderTest extends KernelTestBase {
   */
  protected static $modules = ['entity_test', 'user', 'system'];

  /**
   * {@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}
   */
  protected function setUp(): void {
    parent::setUp();

    $this->setUpCurrentUser(['uid' => 1]);
    $permissions = [
      'administer entity_test content',
      'view test entity',
    ];
    $this->setUpCurrentUser(['uid' => 2], $permissions);

    $this->installEntitySchema('entity_test_mul');
    $this->installEntitySchema('entity_test_admin_routes');
+2 −0
Original line number Diff line number Diff line
@@ -10,6 +10,8 @@
/**
 * Tests the caching of render items via functional tests.
 *
 * @todo Remove or updated in https://www.drupal.org/project/drupal/issues/3436395.
 *
 * @group Render
 */
class RenderCacheTest extends KernelTestBase {