core/lib/Drupal/Core/Entity/Entity.php | 2 +- .../Tests/Core/Config/Entity/ConfigEntityStorageTest.php | 10 +++++----- core/tests/Drupal/Tests/Core/Entity/EntityUnitTest.php | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/core/lib/Drupal/Core/Entity/Entity.php b/core/lib/Drupal/Core/Entity/Entity.php index b251ab4..533c71a 100644 --- a/core/lib/Drupal/Core/Entity/Entity.php +++ b/core/lib/Drupal/Core/Entity/Entity.php @@ -411,7 +411,7 @@ public function getCacheTag() { public static function getListCacheTags() { // @todo Add bundle-specific listing cache tag? https://drupal.org/node/2145751 $entity_type_id = \Drupal::entityManager()->getEntityTypeFromClass(get_called_class()); - return [$entity_type_id . 's']; + return [$entity_type_id . '_list']; } /** diff --git a/core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityStorageTest.php b/core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityStorageTest.php index e83e859..ff3c574 100644 --- a/core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityStorageTest.php +++ b/core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityStorageTest.php @@ -247,7 +247,7 @@ public function testSaveInsert(EntityInterface $entity) { $this->cacheBackend->expects($this->once()) ->method('invalidateTags') ->with(array( - $this->entityTypeId . 's', // List cache tag. + $this->entityTypeId . '_list', // List cache tag. )); $this->configFactory->expects($this->exactly(2)) @@ -307,7 +307,7 @@ public function testSaveUpdate(EntityInterface $entity) { ->method('invalidateTags') ->with(array( $this->entityTypeId . ':foo', // Own cache tag. - $this->entityTypeId . 's', // List cache tag. + $this->entityTypeId . '_list', // List cache tag. )); $this->configFactory->expects($this->exactly(2)) @@ -367,7 +367,7 @@ public function testSaveRename(ConfigEntityInterface $entity) { ->method('invalidateTags') ->with(array( $this->entityTypeId .':bar', // Own cache tag. - $this->entityTypeId . 's', // List cache tag. + $this->entityTypeId . '_list', // List cache tag. )); $this->configFactory->expects($this->once()) @@ -499,7 +499,7 @@ public function testSaveNoMismatch() { $this->cacheBackend->expects($this->once()) ->method('invalidateTags') ->with(array( - $this->entityTypeId . 's', // List cache tag. + $this->entityTypeId . '_list', // List cache tag. )); $this->configFactory->expects($this->once()) @@ -734,7 +734,7 @@ public function testDelete() { ->with(array( $this->entityTypeId . ':bar', // Own cache tag. $this->entityTypeId . ':foo', // Own cache tag. - $this->entityTypeId . 's', // List cache tag. + $this->entityTypeId . '_list', // List cache tag. )); $this->configFactory->expects($this->exactly(2)) diff --git a/core/tests/Drupal/Tests/Core/Entity/EntityUnitTest.php b/core/tests/Drupal/Tests/Core/Entity/EntityUnitTest.php index 92b6f2b..684024b 100644 --- a/core/tests/Drupal/Tests/Core/Entity/EntityUnitTest.php +++ b/core/tests/Drupal/Tests/Core/Entity/EntityUnitTest.php @@ -403,13 +403,13 @@ public function testPostSave() { $this->cacheBackend->expects($this->at(0)) ->method('invalidateTags') ->with(array( - $this->entityTypeId . 's', // List cache tag. + $this->entityTypeId . '_list', // List cache tag. )); $this->cacheBackend->expects($this->at(1)) ->method('invalidateTags') ->with(array( $this->entityTypeId . ':' . $this->values['id'], // Own cache tag. - $this->entityTypeId . 's', // List cache tag. + $this->entityTypeId . '_list', // List cache tag. )); // This method is internal, so check for errors on calling it only. @@ -465,7 +465,7 @@ public function testPostDelete() { ->method('invalidateTags') ->with(array( $this->entityTypeId . ':' . $this->values['id'], - $this->entityTypeId . 's', + $this->entityTypeId . '_list', )); $storage = $this->getMock('\Drupal\Core\Entity\EntityStorageInterface');