Example #1
0
 public function testCreateIndex()
 {
     $index = $this->getMockBuilder('Elastica\\Index')->disableOriginalConstructor()->setMethods(array('create'))->getMock();
     $index->expects($this->once())->method('create')->with(array('foo' => 'bar'), true);
     $this->elasticaClient->expects($this->once())->method('getIndex')->with('comments')->will($this->returnValue($index));
     $this->client->createIndex('comments', array('foo' => 'bar'));
 }