public function testClearIndex() { $this->eventDispatcher->expects($this->exactly(2))->method('dispatch'); $this->solrClientFake->expects($this->once())->method('getEndpoints')->will($this->returnValue(array('core0' => array()))); $this->assertDeleteQueryWasExecuted(); $solr = new Solr($this->solrClientFake, $this->commandFactory, $this->eventDispatcher, $this->metaFactory, $this->mapper); $solr->clearIndex(); }