Doctrine\Search\ElasticSearch\Client::deleteIndex PHP Method

deleteIndex() public method

{@inheritDoc}
public deleteIndex ( $index )
    public function deleteIndex($index)
    {
        $this->getIndex($index)->delete();
    }

Usage Example

Example #1
0
 public function testDeleteIndex()
 {
     $index = $this->getMockBuilder('Elastica\\Index')->disableOriginalConstructor()->setMethods(array('delete'))->getMock();
     $index->expects($this->once())->method('delete');
     $this->elasticaClient->expects($this->once())->method('getIndex')->with('comments')->will($this->returnValue($index));
     $this->client->deleteIndex('comments');
 }