diff --git a/core/lib/Drupal/Core/Entity/EntityStorageBase.php b/core/lib/Drupal/Core/Entity/EntityStorageBase.php index 3b78371..6a3b13f 100644 --- a/core/lib/Drupal/Core/Entity/EntityStorageBase.php +++ b/core/lib/Drupal/Core/Entity/EntityStorageBase.php @@ -555,9 +555,4 @@ public function getAggregateQuery($conjunction = 'AND') { * The name of the service for the query for this entity storage. */ abstract protected function getQueryServiceName(); - - public function __destruct() { - $this->staticCacheBackend->invalidateTags(['entity_static_cache']); - } - } diff --git a/core/tests/Drupal/Tests/Core/Session/UserSessionTest.php b/core/tests/Drupal/Tests/Core/Session/UserSessionTest.php index f83515c..1eb7e89 100644 --- a/core/tests/Drupal/Tests/Core/Session/UserSessionTest.php +++ b/core/tests/Drupal/Tests/Core/Session/UserSessionTest.php @@ -2,6 +2,7 @@ namespace Drupal\Tests\Core\Session; +use Drupal\Core\Cache\MemoryBackend; use Drupal\Core\DependencyInjection\ContainerBuilder; use Drupal\Core\Session\UserSession; use Drupal\Tests\UnitTestCase; @@ -94,6 +95,7 @@ protected function setUp() { ))); $role_storage = $this->getMockBuilder('Drupal\user\RoleStorage') + ->setConstructorArgs(['role', new MemoryBackend('static')]) ->disableOriginalConstructor() ->setMethods(array('loadMultiple')) ->getMock();