protected function ViewExecutableTest::assertViewDestroy in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/views/src/Tests/ViewExecutableTest.php \Drupal\views\Tests\ViewExecutableTest::assertViewDestroy()
Asserts that expected view properties have been unset by destroy().
Parameters
\Drupal\views\ViewExecutable $view:
1 call to ViewExecutableTest::assertViewDestroy()
- ViewExecutableTest::testDestroy in core/
modules/ views/ src/ Tests/ ViewExecutableTest.php - Tests the deconstructor to be sure that necessary objects are removed.
File
- core/
modules/ views/ src/ Tests/ ViewExecutableTest.php, line 350 - Contains \Drupal\views\Tests\ViewExecutableTest.
Class
- ViewExecutableTest
- Tests the ViewExecutable class.
Namespace
Drupal\views\TestsCode
protected function assertViewDestroy($view) {
$reflection = new \ReflectionClass($view);
$defaults = $reflection
->getDefaultProperties();
// The storage and user should remain.
unset($defaults['storage'], $defaults['user'], $defaults['request'], $defaults['routeProvider']);
foreach ($defaults as $property => $default) {
$this
->assertIdentical($this
->getProtectedProperty($view, $property), $default);
}
}