From 9dbd1db0fc327248232bab4b4b6175de848e5d2d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Mantas=20Jonu=C5=A1as?= <mantas.jonusas@nfq.lt>
Date: Wed, 8 Apr 2015 10:46:37 +0300
Subject: [PATCH] Updated terms aggregation

---
 Aggregation/TermsAggregationTest.php | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/Aggregation/TermsAggregationTest.php b/Aggregation/TermsAggregationTest.php
index 25f551b..e988c1f 100644
--- a/Aggregation/TermsAggregationTest.php
+++ b/Aggregation/TermsAggregationTest.php
@@ -64,7 +64,7 @@ class TermsAggregationTest extends \PHPUnit_Framework_TestCase
         $aggregation = new TermsAggregation('test_agg');
         $aggregation->setField('test_field');
         $aggregation->setSize(1);
-        $aggregation->setMinDocumentCount(10);
+        $aggregation->setMinDocCount(10);
 
         $result = [
             'agg_test_agg' => [
@@ -141,7 +141,7 @@ class TermsAggregationTest extends \PHPUnit_Framework_TestCase
         // Case #5 terms aggregation with order default direction.
         $aggregation = new TermsAggregation('test_agg');
         $aggregation->setField('test_field');
-        $aggregation->setOrder(TermsAggregation::MODE_COUNT);
+        $aggregation->setOrder('_count');
 
         $result = [
             'agg_test_agg' => [
@@ -163,7 +163,7 @@ class TermsAggregationTest extends \PHPUnit_Framework_TestCase
         // Case #6 terms aggregation with order term mode, desc direction.
         $aggregation = new TermsAggregation('test_agg');
         $aggregation->setField('test_field');
-        $aggregation->setOrder(TermsAggregation::MODE_TERM, TermsAggregation::DIRECTION_DESC);
+        $aggregation->setOrder('_term', TermsAggregation::DIRECTION_DESC);
 
         $result = [
             'agg_test_agg' => [
-- 
GitLab