public function SearchApiElasticsearchElasticaTest::testRemoveIndex in Search API Elasticsearch 7
testRemoveIndex
@dataProvider transportProvider @access public
Return value
void
File
- modules/
elastica/ tests/ phpunit/ SearchApiElasticsearchElasticaTest.php, line 143 - Contains tests for SearchApiElasticsearchElastica.
Class
- SearchApiElasticsearchElasticaTest
- @file Contains tests for SearchApiElasticsearchElastica.
Code
public function testRemoveIndex($transport) {
$this->_client
->setTransport($transport);
$status = new \Elastica\Status($this->_client
->getElasticaClient());
$this
->assertTrue($status
->indexExists($this->_client
->getElasticaIndex($this->_index)
->getName()));
$this->_client
->removeIndex($this->_index);
$status
->refresh();
$this
->assertFalse($status
->indexExists($this->_client
->getElasticaIndex($this->_index)
->getName()));
}