diff --git a/core/modules/views/lib/Drupal/views/Tests/ViewExecutableTest.php b/core/modules/views/lib/Drupal/views/Tests/ViewExecutableTest.php index 8e16535..04e2ee4 100644 --- a/core/modules/views/lib/Drupal/views/Tests/ViewExecutableTest.php +++ b/core/modules/views/lib/Drupal/views/Tests/ViewExecutableTest.php @@ -360,8 +360,9 @@ public function testDestroy() { protected function assertViewDestroy($view) { $reflection = new \ReflectionClass($view); $defaults = $reflection->getDefaultProperties(); - // The storage should remain. + // The storage and user should remain. unset($defaults['storage']); + unset($defaults['user']); foreach ($defaults as $property => $default) { $this->assertIdentical($this->getProtectedProperty($view, $property), $default); diff --git a/core/modules/views/lib/Drupal/views/ViewExecutable.php b/core/modules/views/lib/Drupal/views/ViewExecutable.php index 1424b27..c68e2a0 100644 --- a/core/modules/views/lib/Drupal/views/ViewExecutable.php +++ b/core/modules/views/lib/Drupal/views/ViewExecutable.php @@ -1797,9 +1797,10 @@ public function destroy() { $reflection = new \ReflectionClass($this); $defaults = $reflection->getDefaultProperties(); - // The storage should not be reset. This is not generated by the execution - // of a view. + // The external dependencies should not be reset. This is not generated by + // the execution of a view. unset($defaults['storage']); + unset($defaults['user']); foreach ($defaults as $property => $default) { $this->{$property} = $default; }