Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
b70ee4b4
Commit
b70ee4b4
authored
Nov 14, 2012
by
catch
Browse files
Issue
#1831142
by damiankloip, dawehner: Fixed Path is never empty in option summary.
parent
962d4503
Changes
2
Hide whitespace changes
Inline
Side-by-side
core/modules/views/lib/Drupal/views/Plugin/views/display/PathPluginBase.php
View file @
b70ee4b4
...
...
@@ -219,9 +219,13 @@ public function optionsSummary(&$categories, &$options) {
),
);
$path
=
strip_tags
(
'/'
.
$this
->
getOption
(
'path'
));
$path
=
strip_tags
(
$this
->
getOption
(
'path'
));
if
(
empty
(
$path
))
{
$path
=
t
(
'None'
);
$path
=
t
(
'No path is set'
);
}
else
{
$path
=
'/'
.
$path
;
}
$options
[
'path'
]
=
array
(
...
...
core/modules/views/lib/Drupal/views/Tests/UI/DisplayPath.php
0 → 100644
View file @
b70ee4b4
<?php
/**
* @file
* Contains \Drupal\views\Tests\UI\DisplayPath
*/
namespace
Drupal\views\Tests\UI
;
/**
* Tests the UI of generic display path plugin.
*
* @see \Drupal\views\Plugin\views\display\PathPluginBase
*/
class
DisplayPath
extends
UITestBase
{
public
static
function
getInfo
()
{
return
array
(
'name'
=>
'Display Path: UI'
,
'description'
=>
'Tests the UI of generic display path plugin.'
,
'group'
=>
'Views UI'
,
);
}
public
function
testPathUI
()
{
$this
->
drupalGet
(
'admin/structure/views/view/test_view'
);
// Add a new page display and check the appearing text.
$this
->
drupalPost
(
NULL
,
array
(),
'Add Page'
);
$this
->
assertText
(
t
(
'No path is set'
),
'The right text appears if no path was set.'
);
// Save a path and make sure the summary appears as expected.
$random_path
=
$this
->
randomName
();
$this
->
drupalPost
(
"admin/structure/views/nojs/display/test_view/page_1/path"
,
array
(
'path'
=>
$random_path
),
t
(
'Apply'
));
$this
->
assertText
(
'/'
.
$random_path
,
'The custom path appears in the summary.'
);
}
}
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