Commit 261e709a authored by webchick's avatar webchick

Issue #2452659 by cilefen: Taxonomy term View preview is broken

parent 14f0f455
......@@ -350,7 +350,7 @@ protected function assertViewDestroy($view) {
$reflection = new \ReflectionClass($view);
$defaults = $reflection->getDefaultProperties();
// The storage and user should remain.
unset($defaults['storage'], $defaults['user'], $defaults['request']);
unset($defaults['storage'], $defaults['user'], $defaults['request'], $defaults['routeProvider']);
foreach ($defaults as $property => $default) {
$this->assertIdentical($this->getProtectedProperty($view, $property), $default);
......
......@@ -1923,7 +1923,7 @@ public function destroy() {
$defaults = $reflection->getDefaultProperties();
// The external dependencies should not be reset. This is not generated by
// the execution of a view.
unset($defaults['storage'], $defaults['user'], $defaults['request']);
unset($defaults['storage'], $defaults['user'], $defaults['request'], $defaults['routeProvider']);
foreach ($defaults as $property => $default) {
$this->{$property} = $default;
......
......@@ -92,6 +92,18 @@ function testPreviewUI() {
$this->assertTrue(strpos($result[0], '<title>' . $view['page[title]'] . '</title>'), 'The Feed RSS preview was rendered.');
}
/**
* Tests the taxonomy term preview AJAX.
*
* This tests a specific regression in the taxonomy term view preview.
*
* @see https://www.drupal.org/node/2452659
*/
public function testTaxonomyAJAX() {
\Drupal::service('module_installer')->install(array('taxonomy'));
$this->getPreviewAJAX('taxonomy_term', 'page_1', 0);
}
/**
* Tests pagers in the preview form.
*/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment