Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
project
drupal
Commits
261e709a
Commit
261e709a
authored
Mar 16, 2015
by
webchick
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue
#2452659
by cilefen: Taxonomy term View preview is broken
parent
14f0f455
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
2 deletions
+14
-2
core/modules/views/src/Tests/ViewExecutableTest.php
core/modules/views/src/Tests/ViewExecutableTest.php
+1
-1
core/modules/views/src/ViewExecutable.php
core/modules/views/src/ViewExecutable.php
+1
-1
core/modules/views_ui/src/Tests/PreviewTest.php
core/modules/views_ui/src/Tests/PreviewTest.php
+12
-0
No files found.
core/modules/views/src/Tests/ViewExecutableTest.php
View file @
261e709a
...
...
@@ -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
);
...
...
core/modules/views/src/ViewExecutable.php
View file @
261e709a
...
...
@@ -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
;
...
...
core/modules/views_ui/src/Tests/PreviewTest.php
View file @
261e709a
...
...
@@ -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.
*/
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment