Loading core/modules/node/tests/src/Functional/NodeAccessCacheabilityTest.php +2 −10 Original line number Diff line number Diff line Loading @@ -28,14 +28,6 @@ class NodeAccessCacheabilityTest extends NodeTestBase { 'node_access_test_auto_bubbling', ]; /** * {@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 @@ -66,9 +58,9 @@ public function testNodeAccessCacheabilitySafeguard(): void { $this->drupalGet(new Url('node_access_test_auto_bubbling')); $this->assertCacheContext('user.node_grants:view'); // The root user has the 'bypass node access' permission, which means the // The user has the 'bypass node access' permission, which means the // node grants cache context is not necessary. $this->drupalLogin($this->rootUser); $this->drupalLogin($this->drupalCreateUser(['bypass node access'])); $this->drupalGet(new Url('node_access_test_auto_bubbling')); $this->assertNoCacheContext('user.node_grants:view'); $this->drupalLogout(); Loading core/modules/node/tests/src/Functional/NodeAccessGrantsCacheContextTest.php +9 −9 Original line number Diff line number Diff line Loading @@ -22,14 +22,6 @@ class NodeAccessGrantsCacheContextTest extends NodeTestBase { */ protected static $modules = ['node_access_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 @@ -52,6 +44,11 @@ class NodeAccessGrantsCacheContextTest extends NodeTestBase { */ protected User $noAccessUser2; /** * User with permission to bypass node access. */ protected $adminUser; /** * @var array */ Loading Loading @@ -86,9 +83,12 @@ protected function setUp(): void { 'access content overview', 'access content', ]); $this->adminUser = $this->drupalCreateUser([ 'bypass node access', ]); $this->userMapping = [ 1 => $this->rootUser, 1 => $this->adminUser, 2 => $this->accessUser, 3 => $this->noAccessUser, ]; Loading core/modules/node/tests/src/Kernel/NodeAccessLanguageAwareCombinationTest.php +5 −12 Original line number Diff line number Diff line Loading @@ -9,7 +9,6 @@ use Drupal\field\Entity\FieldConfig; use Drupal\language\Entity\ConfigurableLanguage; use Drupal\node\Entity\NodeType; use Drupal\user\Entity\User; use Drupal\field\Entity\FieldStorageConfig; /** Loading @@ -30,14 +29,6 @@ class NodeAccessLanguageAwareCombinationTest extends NodeAccessTestBase { 'node_access_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; /** * A set of nodes to use in testing. * Loading Loading @@ -99,9 +90,11 @@ protected function setUp(): void { // Create a normal authenticated user. $this->webUser = $this->drupalCreateUser(['access content']); // Load the user 1 user for later use as an admin user with permission to // see everything. $this->adminUser = User::load(1); // Create a user as an admin user with permission bypass node access // to see everything. $this->adminUser = $this->drupalCreateUser([ 'bypass node access', ]); // The node_access_test_language module allows individual translations of a // node to be marked private (not viewable by normal users), and the Loading core/modules/node/tests/src/Kernel/NodeAccessLanguageAwareTest.php +5 −12 Original line number Diff line number Diff line Loading @@ -8,7 +8,6 @@ use Drupal\Core\Language\LanguageInterface; use Drupal\field\Entity\FieldConfig; use Drupal\language\Entity\ConfigurableLanguage; use Drupal\user\Entity\User; use Drupal\field\Entity\FieldStorageConfig; /** Loading @@ -25,14 +24,6 @@ class NodeAccessLanguageAwareTest extends NodeAccessTestBase { */ protected static $modules = ['language', 'node_access_test_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; /** * A set of nodes to use in testing. * Loading Loading @@ -88,9 +79,11 @@ protected function setUp(): void { // Create a normal authenticated user. $this->webUser = $this->drupalCreateUser(['access content']); // Load the user 1 user for later use as an admin user with permission to // see everything. $this->adminUser = User::load(1); // Create a user as an admin user with permission bypass node access // to see everything. $this->adminUser = $this->drupalCreateUser([ 'bypass node access', ]); // Add Hungarian and Catalan. ConfigurableLanguage::createFromLangcode('hu')->save(); Loading core/modules/node/tests/src/Kernel/NodeAccessLanguageTest.php +5 −12 Original line number Diff line number Diff line Loading @@ -8,7 +8,6 @@ use Drupal\Core\Language\LanguageInterface; use Drupal\language\Entity\ConfigurableLanguage; use Drupal\node\Entity\NodeType; use Drupal\user\Entity\User; /** * Tests multilingual node access with a module that is not language-aware. Loading @@ -22,14 +21,6 @@ class NodeAccessLanguageTest extends NodeAccessTestBase { */ protected static $modules = ['language', 'node_access_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 @@ -193,9 +184,11 @@ public function testNodeAccessQueryTag(): void { // Create a normal authenticated user. $web_user = $this->drupalCreateUser(['access content']); // Load the user 1 user for later use as an admin user with permission to // see everything. $admin_user = User::load(1); // Create a user as an admin user with permission bypass node access // to see everything. $admin_user = $this->drupalCreateUser([ 'bypass node access', ]); // Creating a private node with langcode Hungarian, will be saved as // the fallback in node access table. Loading Loading
core/modules/node/tests/src/Functional/NodeAccessCacheabilityTest.php +2 −10 Original line number Diff line number Diff line Loading @@ -28,14 +28,6 @@ class NodeAccessCacheabilityTest extends NodeTestBase { 'node_access_test_auto_bubbling', ]; /** * {@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 @@ -66,9 +58,9 @@ public function testNodeAccessCacheabilitySafeguard(): void { $this->drupalGet(new Url('node_access_test_auto_bubbling')); $this->assertCacheContext('user.node_grants:view'); // The root user has the 'bypass node access' permission, which means the // The user has the 'bypass node access' permission, which means the // node grants cache context is not necessary. $this->drupalLogin($this->rootUser); $this->drupalLogin($this->drupalCreateUser(['bypass node access'])); $this->drupalGet(new Url('node_access_test_auto_bubbling')); $this->assertNoCacheContext('user.node_grants:view'); $this->drupalLogout(); Loading
core/modules/node/tests/src/Functional/NodeAccessGrantsCacheContextTest.php +9 −9 Original line number Diff line number Diff line Loading @@ -22,14 +22,6 @@ class NodeAccessGrantsCacheContextTest extends NodeTestBase { */ protected static $modules = ['node_access_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 @@ -52,6 +44,11 @@ class NodeAccessGrantsCacheContextTest extends NodeTestBase { */ protected User $noAccessUser2; /** * User with permission to bypass node access. */ protected $adminUser; /** * @var array */ Loading Loading @@ -86,9 +83,12 @@ protected function setUp(): void { 'access content overview', 'access content', ]); $this->adminUser = $this->drupalCreateUser([ 'bypass node access', ]); $this->userMapping = [ 1 => $this->rootUser, 1 => $this->adminUser, 2 => $this->accessUser, 3 => $this->noAccessUser, ]; Loading
core/modules/node/tests/src/Kernel/NodeAccessLanguageAwareCombinationTest.php +5 −12 Original line number Diff line number Diff line Loading @@ -9,7 +9,6 @@ use Drupal\field\Entity\FieldConfig; use Drupal\language\Entity\ConfigurableLanguage; use Drupal\node\Entity\NodeType; use Drupal\user\Entity\User; use Drupal\field\Entity\FieldStorageConfig; /** Loading @@ -30,14 +29,6 @@ class NodeAccessLanguageAwareCombinationTest extends NodeAccessTestBase { 'node_access_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; /** * A set of nodes to use in testing. * Loading Loading @@ -99,9 +90,11 @@ protected function setUp(): void { // Create a normal authenticated user. $this->webUser = $this->drupalCreateUser(['access content']); // Load the user 1 user for later use as an admin user with permission to // see everything. $this->adminUser = User::load(1); // Create a user as an admin user with permission bypass node access // to see everything. $this->adminUser = $this->drupalCreateUser([ 'bypass node access', ]); // The node_access_test_language module allows individual translations of a // node to be marked private (not viewable by normal users), and the Loading
core/modules/node/tests/src/Kernel/NodeAccessLanguageAwareTest.php +5 −12 Original line number Diff line number Diff line Loading @@ -8,7 +8,6 @@ use Drupal\Core\Language\LanguageInterface; use Drupal\field\Entity\FieldConfig; use Drupal\language\Entity\ConfigurableLanguage; use Drupal\user\Entity\User; use Drupal\field\Entity\FieldStorageConfig; /** Loading @@ -25,14 +24,6 @@ class NodeAccessLanguageAwareTest extends NodeAccessTestBase { */ protected static $modules = ['language', 'node_access_test_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; /** * A set of nodes to use in testing. * Loading Loading @@ -88,9 +79,11 @@ protected function setUp(): void { // Create a normal authenticated user. $this->webUser = $this->drupalCreateUser(['access content']); // Load the user 1 user for later use as an admin user with permission to // see everything. $this->adminUser = User::load(1); // Create a user as an admin user with permission bypass node access // to see everything. $this->adminUser = $this->drupalCreateUser([ 'bypass node access', ]); // Add Hungarian and Catalan. ConfigurableLanguage::createFromLangcode('hu')->save(); Loading
core/modules/node/tests/src/Kernel/NodeAccessLanguageTest.php +5 −12 Original line number Diff line number Diff line Loading @@ -8,7 +8,6 @@ use Drupal\Core\Language\LanguageInterface; use Drupal\language\Entity\ConfigurableLanguage; use Drupal\node\Entity\NodeType; use Drupal\user\Entity\User; /** * Tests multilingual node access with a module that is not language-aware. Loading @@ -22,14 +21,6 @@ class NodeAccessLanguageTest extends NodeAccessTestBase { */ protected static $modules = ['language', 'node_access_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 @@ -193,9 +184,11 @@ public function testNodeAccessQueryTag(): void { // Create a normal authenticated user. $web_user = $this->drupalCreateUser(['access content']); // Load the user 1 user for later use as an admin user with permission to // see everything. $admin_user = User::load(1); // Create a user as an admin user with permission bypass node access // to see everything. $admin_user = $this->drupalCreateUser([ 'bypass node access', ]); // Creating a private node with langcode Hungarian, will be saved as // the fallback in node access table. Loading