diff --git a/core/lib/Drupal/Core/Access/RefinableDependentAccessInterface.php b/core/lib/Drupal/Core/Access/RefinableDependentAccessInterface.php index 4e5f872302..bb024c987e 100644 --- a/core/lib/Drupal/Core/Access/RefinableDependentAccessInterface.php +++ b/core/lib/Drupal/Core/Access/RefinableDependentAccessInterface.php @@ -21,7 +21,7 @@ public function setAccessDependency(AccessibleInterface $access_dependency); /** - * Merges an access dependency into the existing access dependency. + * Adds an access dependency into the existing access dependency. * * If no existing dependency is currently set this will set the dependency * will be set to the new value. @@ -40,6 +40,6 @@ public function setAccessDependency(AccessibleInterface $access_dependency); * * @return $this */ - public function mergeAccessDependency(AccessibleInterface $access_dependency); + public function addAccessDependency(AccessibleInterface $access_dependency); } diff --git a/core/lib/Drupal/Core/Access/RefinableDependentAccessTrait.php b/core/lib/Drupal/Core/Access/RefinableDependentAccessTrait.php index c008f5b86b..4826f57926 100644 --- a/core/lib/Drupal/Core/Access/RefinableDependentAccessTrait.php +++ b/core/lib/Drupal/Core/Access/RefinableDependentAccessTrait.php @@ -32,7 +32,7 @@ public function getAccessDependency() { /** * {@inheritdoc} */ - public function mergeAccessDependency(AccessibleInterface $access_dependency) { + public function addAccessDependency(AccessibleInterface $access_dependency) { if (empty($this->accessDependency)) { $this->accessDependency = $access_dependency; return $this; diff --git a/core/modules/block_content/tests/src/Functional/Update/BlockContentReusableUpdateTest.php b/core/modules/block_content/tests/src/Functional/Update/BlockContentReusableUpdateTest.php index 5d82f6f904..4e8d99398b 100644 --- a/core/modules/block_content/tests/src/Functional/Update/BlockContentReusableUpdateTest.php +++ b/core/modules/block_content/tests/src/Functional/Update/BlockContentReusableUpdateTest.php @@ -9,6 +9,7 @@ * Tests 'reusable' field related update functions for the Block Content module. * * @group Update + * @group legacy */ class BlockContentReusableUpdateTest extends UpdatePathTestBase { diff --git a/core/tests/Drupal/Tests/Core/Access/DependentAccessTest.php b/core/tests/Drupal/Tests/Core/Access/DependentAccessTest.php index 86a98429d4..339e11f8d3 100644 --- a/core/tests/Drupal/Tests/Core/Access/DependentAccessTest.php +++ b/core/tests/Drupal/Tests/Core/Access/DependentAccessTest.php @@ -57,7 +57,7 @@ public function testSetAccessDependency($use_set_first) { $testRefinable->setAccessDependency($this->forbidden); } else { - $testRefinable->mergeAccessDependency($this->forbidden); + $testRefinable->addAccessDependency($this->forbidden); } $accessResult = $testRefinable->getAccessDependency()->access('view', $this->account, TRUE); $this->assertTrue($accessResult->isForbidden()); @@ -83,14 +83,14 @@ public function testMergeNonGroup($use_set_first) { $testRefinable->setAccessDependency($this->forbidden); } else { - $testRefinable->mergeAccessDependency($this->forbidden); + $testRefinable->addAccessDependency($this->forbidden); } $accessResult = $testRefinable->getAccessDependency()->access('view', $this->account, TRUE); $this->assertTrue($accessResult->isForbidden()); $this->assertEquals('Because I said so', $accessResult->getReason()); - $testRefinable->mergeAccessDependency($this->neutral); + $testRefinable->addAccessDependency($this->neutral); /** @var \Drupal\Core\Access\AccessGroupAnd $dependency */ $dependency = $testRefinable->getAccessDependency(); // Ensure the new dependency create a new AND group when merged. @@ -118,10 +118,10 @@ public function testMergeGroup($use_set_first) { $testRefinable->setAccessDependency($orGroup); } else { - $testRefinable->mergeAccessDependency($orGroup); + $testRefinable->addAccessDependency($orGroup); } - $testRefinable->mergeAccessDependency($this->neutral); + $testRefinable->addAccessDependency($this->neutral); /** @var \Drupal\Core\Access\AccessGroupOr $dependency */ $dependency = $testRefinable->getAccessDependency();