protected function SearchApiSolrTest::checkModuleUninstall in Search API Solr 4.x
Same name and namespace in other branches
- 8.3 tests/src/Kernel/SearchApiSolrTest.php \Drupal\Tests\search_api_solr\Kernel\SearchApiSolrTest::checkModuleUninstall()
- 8 tests/src/Kernel/SearchApiSolrTest.php \Drupal\Tests\search_api_solr\Kernel\SearchApiSolrTest::checkModuleUninstall()
- 8.2 tests/src/Kernel/SearchApiSolrTest.php \Drupal\Tests\search_api_solr\Kernel\SearchApiSolrTest::checkModuleUninstall()
Overrides SolrBackendTestBase::checkModuleUninstall
File
- tests/
src/ Kernel/ SearchApiSolrTest.php, line 232
Class
- SearchApiSolrTest
- Tests index and search capabilities using the Solr search backend.
Namespace
Drupal\Tests\search_api_solr\KernelCode
protected function checkModuleUninstall() {
// See whether clearing the server works.
// Regression test for #2156151.
/** @var \Drupal\search_api\ServerInterface $server */
$server = Server::load($this->serverId);
/** @var \Drupal\search_api\IndexInterface $index */
$index = Index::load($this->indexId);
$server
->deleteAllIndexItems($index);
$this
->ensureCommit($index);
$query = $this
->buildSearch();
$results = $query
->execute();
$this
->assertEquals(0, $results
->getResultCount(), 'Clearing the server worked correctly.');
}