blob: d0bb783815a7c4cf3131d47f2460194b3e86c8b2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
<?php
namespace Elastica\Test\Index;
use Elastica\Test\Base as BaseTest;
class StatsTest extends BaseTest
{
/**
* @group functional
*/
public function testGetSettings()
{
$indexName = 'test';
$client = $this->_getClient();
$index = $client->getIndex($indexName);
$index->create(array(), true);
$stats = $index->getStats();
$this->assertInstanceOf('Elastica\Index\Stats', $stats);
$this->assertTrue($stats->getResponse()->isOk());
$this->assertEquals(0, $stats->get('_all', 'indices', 'test', 'primaries', 'docs', 'count'));
}
}
|