Commit e4446ccf by Carsten Brandt

removed old test

parent e060f3ad
......@@ -256,15 +256,16 @@ class ActiveRecordTest extends ElasticSearchTestCase
// TODO test query() and filter()
}
public function testSearchFacets()
{
$result = Customer::find()->addStatisticalFacet('status_stats', ['field' => 'status'])->search();
$this->assertArrayHasKey('facets', $result);
$this->assertEquals(3, $result['facets']['status_stats']['count']);
$this->assertEquals(4, $result['facets']['status_stats']['total']); // sum of values
$this->assertEquals(1, $result['facets']['status_stats']['min']);
$this->assertEquals(2, $result['facets']['status_stats']['max']);
}
// TODO test aggregations
// public function testSearchFacets()
// {
// $result = Customer::find()->addAggregation('status_stats', ['field' => 'status'])->search();
// $this->assertArrayHasKey('facets', $result);
// $this->assertEquals(3, $result['facets']['status_stats']['count']);
// $this->assertEquals(4, $result['facets']['status_stats']['total']); // sum of values
// $this->assertEquals(1, $result['facets']['status_stats']['min']);
// $this->assertEquals(2, $result['facets']['status_stats']['max']);
// }
public function testGetDb()
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment