%PDF- %PDF-
Direktori : /home/graphicd/www/vebto/vendor/ongr/elasticsearch-dsl/tests/Functional/Query/ |
Current File : /home/graphicd/www/vebto/vendor/ongr/elasticsearch-dsl/tests/Functional/Query/MatchAllQueryTest.php |
<?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\ElasticsearchDSL\Tests\Functional\Query; use ONGR\ElasticsearchDSL\Query\MatchAllQuery; use ONGR\ElasticsearchDSL\Search; use ONGR\ElasticsearchDSL\Tests\Functional\AbstractElasticsearchTestCase; class MatchAllQueryTest extends AbstractElasticsearchTestCase { /** * {@inheritdoc} */ protected function getDataArray() { return [ 'product' => [ [ 'title' => 'acme', ], [ 'title' => 'foo', ], ] ]; } /** * Match all test */ public function testMatchAll() { $search = new Search(); $matchAll = new MatchAllQuery(); $search->addQuery($matchAll); $q = $search->getQueries(); $results = $this->executeSearch($search); $this->assertEquals($this->getDataArray()['product'], $results); } }