summaryrefslogtreecommitdiff
path: root/vendor/ruflin/elastica/test/lib/Elastica/Test/Index/StatsTest.php
blob: 5e8e8d57eb5eb74a7902ce62c9c8da8f604d03c4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<?php

namespace Elastica\Test\Index;

use Elastica\Test\Base as BaseTest;

class StatsTest extends BaseTest
{

    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'));
    }
}