Issue #2502009 by joelpittet, Cottser, Wim Leers: Remove SafeMarkup::set in SearchExtraTypeSearch::execute()
parent
41cc210c07
commit
d7ab90d9d3
|
@ -7,6 +7,8 @@
|
||||||
|
|
||||||
namespace Drupal\search\Tests;
|
namespace Drupal\search\Tests;
|
||||||
|
|
||||||
|
use Drupal\Component\Utility\SafeMarkup;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Verify the search without keywords set and extra conditions.
|
* Verify the search without keywords set and extra conditions.
|
||||||
*
|
*
|
||||||
|
@ -59,6 +61,6 @@ class SearchKeywordsConditionsTest extends SearchTestBase {
|
||||||
$keys = 'moving drop ' . $this->randomMachineName();
|
$keys = 'moving drop ' . $this->randomMachineName();
|
||||||
$this->drupalGet("search/dummy_path", array('query' => array('keys' => 'bike', 'search_conditions' => $keys)));
|
$this->drupalGet("search/dummy_path", array('query' => array('keys' => 'bike', 'search_conditions' => $keys)));
|
||||||
$this->assertText("Dummy search snippet to display.");
|
$this->assertText("Dummy search snippet to display.");
|
||||||
$this->assertRaw(print_r(array('keys' => 'bike', 'search_conditions' => $keys), TRUE));
|
$this->assertRaw(SafeMarkup::checkPlain(print_r(array('keys' => 'bike', 'search_conditions' => $keys), TRUE)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -64,7 +64,7 @@ class SearchExtraTypeSearch extends ConfigurableSearchPluginBase {
|
||||||
'link' => Url::fromRoute('test_page_test.test_page')->toString(),
|
'link' => Url::fromRoute('test_page_test.test_page')->toString(),
|
||||||
'type' => 'Dummy result type',
|
'type' => 'Dummy result type',
|
||||||
'title' => 'Dummy title',
|
'title' => 'Dummy title',
|
||||||
'snippet' => SafeMarkup::set("Dummy search snippet to display. Keywords: {$this->keywords}\n\nConditions: " . print_r($this->searchParameters, TRUE)),
|
'snippet' => SafeMarkup::format("Dummy search snippet to display. Keywords: @keywords\n\nConditions: @search_parameters", ['@keywords' => $this->keywords, '@search_parameters' => print_r($this->searchParameters, TRUE)]),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue