protected function PagesIntegrationTest::setUp in Search API Autocomplete 8
Overrides BrowserTestBase::setUp
File
- tests/
src/ FunctionalJavascript/ PagesIntegrationTest.php, line 56
Class
- PagesIntegrationTest
- Tests integration with the Search API Pages module.
Namespace
Drupal\Tests\search_api_autocomplete\FunctionalJavascriptCode
protected function setUp() {
parent::setUp();
$permissions = [
'administer search_api',
'administer search_api_autocomplete',
'view search api pages',
];
$this->adminUser = $this
->drupalCreateUser($permissions);
$this->normalUser = $this
->drupalCreateUser();
// Make the test backend support autocomplete so that the "Server" suggester
// becomes available.
$callback = [
TestsHelper::class,
'getSupportedFeatures',
];
$this
->setMethodOverride('backend', 'getSupportedFeatures', $callback);
$callback = [
TestsHelper::class,
'getAutocompleteSuggestions',
];
$this
->setMethodOverride('backend', 'getAutocompleteSuggestions', $callback);
}