Skip to content
Snippets Groups Projects
Commit 261e709a authored by Angie Byron's avatar Angie Byron
Browse files

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

parent 14f0f455
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
...@@ -350,7 +350,7 @@ protected function assertViewDestroy($view) { ...@@ -350,7 +350,7 @@ protected function assertViewDestroy($view) {
$reflection = new \ReflectionClass($view); $reflection = new \ReflectionClass($view);
$defaults = $reflection->getDefaultProperties(); $defaults = $reflection->getDefaultProperties();
// The storage and user should remain. // 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) { foreach ($defaults as $property => $default) {
$this->assertIdentical($this->getProtectedProperty($view, $property), $default); $this->assertIdentical($this->getProtectedProperty($view, $property), $default);
......
...@@ -1923,7 +1923,7 @@ public function destroy() { ...@@ -1923,7 +1923,7 @@ public function destroy() {
$defaults = $reflection->getDefaultProperties(); $defaults = $reflection->getDefaultProperties();
// The external dependencies should not be reset. This is not generated by // The external dependencies should not be reset. This is not generated by
// the execution of a view. // 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) { foreach ($defaults as $property => $default) {
$this->{$property} = $default; $this->{$property} = $default;
......
...@@ -92,6 +92,18 @@ function testPreviewUI() { ...@@ -92,6 +92,18 @@ function testPreviewUI() {
$this->assertTrue(strpos($result[0], '<title>' . $view['page[title]'] . '</title>'), 'The Feed RSS preview was rendered.'); $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. * Tests pagers in the preview form.
*/ */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment