public function AddServerFormTest::testNoBackendPluginsArePresent in Search API 8
Tests the behavior when no backend plugins are available.
File
- tests/
src/ Functional/ AddServerFormTest.php, line 48
Class
- AddServerFormTest
- Tests the "Add server" form.
Namespace
Drupal\Tests\search_api\FunctionalCode
public function testNoBackendPluginsArePresent() {
$this
->drupalGet('/admin/config/search/search-api/add-server');
$this
->assertSession()
->buttonNotExists('Save');
$this
->assertSession()
->pageTextContainsOnce('There are no backend plugins available for the Search API.');
\Drupal::getContainer()
->get('module_installer')
->install([
'search_api_test',
]);
$this
->drupalGet('/admin/config/search/search-api/add-server');
$this
->assertSession()
->buttonExists('Save');
$this
->assertSession()
->pageTextNotContains('There are no backend plugins available for the Search API.');
}