summaryrefslogtreecommitdiff
path: root/vendor/ruflin/elastica/test/lib/Elastica/Test/Aggregation/BaseAggregationTest.php
blob: 5569ca789fc0b7086a452e42b11cf5b118fc731a (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
25
26
27
28
<?php

namespace Elastica\Test\Aggregation;


use Elastica\Index;
use Elastica\Test\Base;

abstract class BaseAggregationTest extends Base
{
    /**
     * @var Index
     */
    protected $_index;

    protected function tearDown()
    {
        parent::tearDown();
        if ($this->_index instanceof Index) {
            $this->_index->delete();
        }
    }

    protected function _createIndex($name = 'test', $delete = true, $shards = 1)
    {
        return parent::_createIndex('test_aggregation_' . $name, $delete, $shards);
    }
}