Ejemplo n.º 1
0
 public function testGetIndexStatuses()
 {
     $index = $this->_createIndex();
     $status = new Elastica_Status($index->getClient());
     $statuses = $status->getIndexStatuses();
     $this->assertInternalType('array', $statuses);
     foreach ($statuses as $indexStatus) {
         $this->assertInstanceOf('Elastica_Index_Status', $indexStatus);
     }
 }
Ejemplo n.º 2
0
 public function testGetIndexStatuses()
 {
     $indexName = 'test';
     $client = new Elastica_Client();
     $index = $client->getIndex($indexName);
     $index->create(array(), true);
     $status = new Elastica_Status($client);
     $statuses = $status->getIndexStatuses();
     $this->assertInternalType('array', $statuses);
     foreach ($statuses as $indexStatus) {
         $this->assertInstanceOf('Elastica_Index_Status', $indexStatus);
     }
 }