Skip to content
Snippets Groups Projects
Commit 030bfb84 authored by catch's avatar catch
Browse files

Issue #3202434 by paulocs, codebymikey, catch, guilhermevp, joachim: The...

Issue #3202434 by paulocs, codebymikey, catch, guilhermevp, joachim: The RequestPath ("request_path") condition plugin summary is inaccurate
parent 55422cea
No related branches found
No related tags found
No related merge requests found
......@@ -124,6 +124,9 @@ public function submitConfigurationForm(array &$form, FormStateInterface $form_s
* {@inheritdoc}
*/
public function summary() {
if (empty($this->configuration['pages'])) {
return $this->t('No page is specified');
}
$pages = array_map('trim', explode("\n", $this->configuration['pages']));
$pages = implode(', ', $pages);
if (!empty($this->configuration['negate'])) {
......
......@@ -88,6 +88,7 @@ public function testConditions() {
/* @var \Drupal\system\Plugin\Condition\RequestPath $condition */
$condition = $this->pluginManager->createInstance('request_path');
$this->assertEquals('No page is specified', $condition->summary());
$condition->setConfig('pages', $pages);
$this->aliasManager->addAlias('/my/pass/page2', '/my/pass/page2');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment