Commit d7ab90d9 authored by alexpott's avatar alexpott
Browse files

Issue #2502009 by joelpittet, Cottser, Wim Leers: Remove SafeMarkup::set in...

Issue #2502009 by joelpittet, Cottser, Wim Leers: Remove SafeMarkup::set in SearchExtraTypeSearch::execute()
parent 41cc210c
......@@ -7,6 +7,8 @@
namespace Drupal\search\Tests;
use Drupal\Component\Utility\SafeMarkup;
/**
* Verify the search without keywords set and extra conditions.
*
......@@ -59,6 +61,6 @@ function testSearchKeywordsConditions() {
$keys = 'moving drop ' . $this->randomMachineName();
$this->drupalGet("search/dummy_path", array('query' => array('keys' => 'bike', 'search_conditions' => $keys)));
$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 @@ public function execute() {
'link' => Url::fromRoute('test_page_test.test_page')->toString(),
'type' => 'Dummy result type',
'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)]),
),
);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment