From 1e818846d44e9b4e9c27958967f1d5a897462d35 Mon Sep 17 00:00:00 2001 From: LTRocky <rokasvaliukas@gmail.com> Date: Tue, 10 Mar 2015 11:59:09 +0200 Subject: [PATCH] Test DSL/Bool --- Bool/BoolTest.php | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 Bool/BoolTest.php diff --git a/Bool/BoolTest.php b/Bool/BoolTest.php new file mode 100644 index 0000000..097e352 --- /dev/null +++ b/Bool/BoolTest.php @@ -0,0 +1,33 @@ +<?php + +/* + * This file is part of the ONGR package. + * + * (c) NFQ Technologies UAB <info@nfq.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace ONGR\ElasticsearchBundle\Tests\Unit\DSL\Aggregation; + +use ONGR\ElasticsearchBundle\DSL\Bool\Bool; +use ONGR\ElasticsearchBundle\DSL\Filter\MissingFilter; + +/** + * Unit test for Bool. + */ +class BoolTest extends \PHPUnit_Framework_TestCase +{ + /** + * Tests isRelevant method. + */ + public function testIsRelevant() + { + $bool = new Bool(); + $this->assertEquals(false, $bool->isRelevant()); + + $bool->addToBool(new MissingFilter('test')); + $this->assertEquals(true, $bool->isRelevant()); + } +} -- GitLab