You are here

protected function BackendTestBase::searchNoResults in Search API 8

Tests that a search on the index doesn't have any results.

1 call to BackendTestBase::searchNoResults()
BackendTestBase::testBackend in tests/src/Kernel/BackendTestBase.php
Tests various indexing scenarios for the search backend.

File

tests/src/Kernel/BackendTestBase.php, line 238

Class

BackendTestBase
Provides a base class for backend tests.

Namespace

Drupal\Tests\search_api\Kernel

Code

protected function searchNoResults() {
  $results = $this
    ->buildSearch('test')
    ->execute();
  $this
    ->assertResults([], $results, 'Search before indexing');
}