Loading core/modules/views/tests/src/Functional/Handler/FieldEntityLinkBaseTest.php +4 −8 Original line number Diff line number Diff line Loading @@ -27,13 +27,6 @@ class FieldEntityLinkBaseTest extends ViewTestBase { */ protected static $modules = ['node', 'language']; /** * {@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 @@ -67,7 +60,10 @@ protected function setUp($import_test_views = TRUE, $modules = ['views_test_conf $translation->save(); } $this->drupalLogin($this->rootUser); $this->drupalLogin($this->createUser([ 'delete any article content', 'edit any article content', ])); } Loading core/modules/views/tests/src/Functional/Plugin/ContextualFiltersStringTest.php +1 −9 Original line number Diff line number Diff line Loading @@ -23,14 +23,6 @@ class ContextualFiltersStringTest extends ViewTestBase { 'views_test_config', ]; /** * {@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 @@ -73,7 +65,7 @@ protected function setUp($import_test_views = TRUE, $modules = ['views_test_conf $this->createUser([], 'user4', FALSE, ['roles' => [$this->role2]]); $this->createUser([], 'user5', FALSE, ['roles' => [$this->role1, $this->role2]]); $this->drupalLogin($this->rootUser); $this->drupalLogin($this->createUser(['administer views'])); } /** Loading core/modules/views/tests/src/Functional/Plugin/DisplayPageWebTest.php +1 −9 Original line number Diff line number Diff line Loading @@ -31,14 +31,6 @@ class DisplayPageWebTest extends ViewTestBase { */ protected static $modules = ['block', 'views_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 Loading @@ -151,7 +143,7 @@ public function testTitleOutput() { * Tests the views page path functionality. */ public function testPagePaths() { $this->drupalLogin($this->rootUser); $this->drupalLogin($this->createUser(['administer views'])); $this->assertPagePath('0'); $this->assertPagePath('9999'); $this->assertPagePath('☺'); Loading core/modules/views/tests/src/Functional/UserBatchActionTest.php +1 −8 Original line number Diff line number Diff line Loading @@ -25,13 +25,6 @@ class UserBatchActionTest extends BrowserTestBase { 'views', ]; /** * {@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 +38,7 @@ public function testUserAction() { $themes = ['stark', 'olivero', 'claro']; $this->container->get('theme_installer')->install($themes); $this->drupalLogin($this->rootUser); $this->drupalLogin($this->createUser(['administer users'])); foreach ($themes as $theme) { $this->config('system.theme')->set('default', $theme)->save(); Loading core/modules/views/tests/src/Kernel/Handler/FieldFieldTest.php +4 −10 Original line number Diff line number Diff line Loading @@ -9,6 +9,7 @@ use Drupal\entity_test\Entity\EntityTestRev; use Drupal\field\Entity\FieldConfig; use Drupal\field\Entity\FieldStorageConfig; use Drupal\Tests\user\Traits\UserCreationTrait; use Drupal\user\Entity\User; use Drupal\views\Plugin\views\field\EntityField; use Drupal\Tests\views\Kernel\ViewsKernelTestBase; Loading @@ -24,6 +25,8 @@ */ class FieldFieldTest extends ViewsKernelTestBase { use UserCreationTrait; /** * {@inheritdoc} */ Loading @@ -35,14 +38,6 @@ class FieldFieldTest extends ViewsKernelTestBase { 'views_entity_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 @@ -90,8 +85,7 @@ protected function setUp($import_test_views = TRUE): void { ViewTestData::createTestViews(static::class, ['views_test_config']); // Bypass any field access. $this->adminUser = User::create(['name' => $this->randomString()]); $this->adminUser->save(); $this->adminUser = $this->createUser(['administer users'], $this->randomString()); $this->container->get('current_user')->setAccount($this->adminUser); $this->testUsers = []; Loading Loading
core/modules/views/tests/src/Functional/Handler/FieldEntityLinkBaseTest.php +4 −8 Original line number Diff line number Diff line Loading @@ -27,13 +27,6 @@ class FieldEntityLinkBaseTest extends ViewTestBase { */ protected static $modules = ['node', 'language']; /** * {@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 @@ -67,7 +60,10 @@ protected function setUp($import_test_views = TRUE, $modules = ['views_test_conf $translation->save(); } $this->drupalLogin($this->rootUser); $this->drupalLogin($this->createUser([ 'delete any article content', 'edit any article content', ])); } Loading
core/modules/views/tests/src/Functional/Plugin/ContextualFiltersStringTest.php +1 −9 Original line number Diff line number Diff line Loading @@ -23,14 +23,6 @@ class ContextualFiltersStringTest extends ViewTestBase { 'views_test_config', ]; /** * {@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 @@ -73,7 +65,7 @@ protected function setUp($import_test_views = TRUE, $modules = ['views_test_conf $this->createUser([], 'user4', FALSE, ['roles' => [$this->role2]]); $this->createUser([], 'user5', FALSE, ['roles' => [$this->role1, $this->role2]]); $this->drupalLogin($this->rootUser); $this->drupalLogin($this->createUser(['administer views'])); } /** Loading
core/modules/views/tests/src/Functional/Plugin/DisplayPageWebTest.php +1 −9 Original line number Diff line number Diff line Loading @@ -31,14 +31,6 @@ class DisplayPageWebTest extends ViewTestBase { */ protected static $modules = ['block', 'views_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 Loading @@ -151,7 +143,7 @@ public function testTitleOutput() { * Tests the views page path functionality. */ public function testPagePaths() { $this->drupalLogin($this->rootUser); $this->drupalLogin($this->createUser(['administer views'])); $this->assertPagePath('0'); $this->assertPagePath('9999'); $this->assertPagePath('☺'); Loading
core/modules/views/tests/src/Functional/UserBatchActionTest.php +1 −8 Original line number Diff line number Diff line Loading @@ -25,13 +25,6 @@ class UserBatchActionTest extends BrowserTestBase { 'views', ]; /** * {@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 +38,7 @@ public function testUserAction() { $themes = ['stark', 'olivero', 'claro']; $this->container->get('theme_installer')->install($themes); $this->drupalLogin($this->rootUser); $this->drupalLogin($this->createUser(['administer users'])); foreach ($themes as $theme) { $this->config('system.theme')->set('default', $theme)->save(); Loading
core/modules/views/tests/src/Kernel/Handler/FieldFieldTest.php +4 −10 Original line number Diff line number Diff line Loading @@ -9,6 +9,7 @@ use Drupal\entity_test\Entity\EntityTestRev; use Drupal\field\Entity\FieldConfig; use Drupal\field\Entity\FieldStorageConfig; use Drupal\Tests\user\Traits\UserCreationTrait; use Drupal\user\Entity\User; use Drupal\views\Plugin\views\field\EntityField; use Drupal\Tests\views\Kernel\ViewsKernelTestBase; Loading @@ -24,6 +25,8 @@ */ class FieldFieldTest extends ViewsKernelTestBase { use UserCreationTrait; /** * {@inheritdoc} */ Loading @@ -35,14 +38,6 @@ class FieldFieldTest extends ViewsKernelTestBase { 'views_entity_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 @@ -90,8 +85,7 @@ protected function setUp($import_test_views = TRUE): void { ViewTestData::createTestViews(static::class, ['views_test_config']); // Bypass any field access. $this->adminUser = User::create(['name' => $this->randomString()]); $this->adminUser->save(); $this->adminUser = $this->createUser(['administer users'], $this->randomString()); $this->container->get('current_user')->setAccount($this->adminUser); $this->testUsers = []; Loading