diff --git a/.travis.yml b/.travis.yml index 85b514fce524690d3c24a2ae596f1279d193303e..3021f7940378be4249828080965de31e59d7214f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,4 @@ -sudo: false +sudo: true language: php php: - 5.4 @@ -6,10 +6,30 @@ php: - 5.6 - 7.0 - hhvm +env: + global: + - JAVA_HOME="/usr/lib/jvm/java-8-oracle/jre" + matrix: + - ES_VERSION="5.0" ELASTICSEARH_PHP="~5.0" + - ES_VERSION="2.4" ELASTICSEARH_PHP="~2.0" matrix: allow_failures: - php: hhvm + exclude: + - php: 5.4 + env: ES_VERSION="5.0" ELASTICSEARH_PHP="~5.0" + - php: 5.5 + env: ES_VERSION="5.0" ELASTICSEARH_PHP="~5.0" +install: + # Container based PHP image ues PHP 5.6.5, once it will be upgraded sudo will be not necessary + - sudo apt-get install -y oracle-java8-set-default + - ES_URL=$(curl -sS "https://esvm-props.kibana.rocks/builds" | jq -r ".branches[\"$ES_VERSION\"].zip") + - curl -L -o elasticsearch.zip $ES_URL + - unzip elasticsearch.zip + - ./elasticsearch-*/bin/elasticsearch -d before_script: + - composer require --no-update elasticsearch/elasticsearch:${ELASTICSEARH_PHP} + - composer config -g github-oauth.github.com $GITHUB_COMPOSER_AUTH - composer install --no-interaction --prefer-dist script: - vendor/bin/phpunit --coverage-clover=coverage.clover diff --git a/composer.json b/composer.json index a59b969918c8f13b7b6389ca55079d260c5576a5..2c66aaf225d9599e90d69eb0b7b3d89f481015e7 100644 --- a/composer.json +++ b/composer.json @@ -17,7 +17,8 @@ "require-dev": { "phpunit/phpunit": "~4.4", "squizlabs/php_codesniffer": "~2.0", - "satooshi/php-coveralls": "~0.7" + "satooshi/php-coveralls": "~0.7", + "elasticsearch/elasticsearch": "~5.0" }, "autoload": { "psr-4": { diff --git a/src/Query/MatchAllQuery.php b/src/Query/MatchAllQuery.php index ec9fde76dca20c3061708f27c2d032d3c257490f..2529ac60f606786bddc1222ebc883cec3eca20ec 100644 --- a/src/Query/MatchAllQuery.php +++ b/src/Query/MatchAllQuery.php @@ -44,6 +44,7 @@ class MatchAllQuery implements BuilderInterface */ public function toArray() { - return [$this->getType() => $this->getParameters()]; + $params = $this->getParameters(); + return [$this->getType() => !empty($params) ? $params : new \stdClass()]; } } diff --git a/tests/Functional/AbstractElasticsearchTestCase.php b/tests/Functional/AbstractElasticsearchTestCase.php new file mode 100644 index 0000000000000000000000000000000000000000..9741cd0bf4ab5a4d2008f94010e211afa73e497f --- /dev/null +++ b/tests/Functional/AbstractElasticsearchTestCase.php @@ -0,0 +1,152 @@ +<?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; + +use Elasticsearch\Client; +use Elasticsearch\ClientBuilder; +use ONGR\ElasticsearchDSL\Search; + +abstract class AbstractElasticsearchTestCase extends \PHPUnit_Framework_TestCase +{ + /** + * Test index name in the elasticsearch. + */ + const INDEX_NAME = 'elasticsaerch-dsl-test'; + + /** + * @var Client + */ + private $client; + + /** + * {@inheritdoc} + */ + protected function setUp() + { + parent::setUp(); + + $this->client = ClientBuilder::create()->build(); + $this->deleteIndex(); + + $this->client->indices()->create( + array_filter( + [ + 'index' => self::INDEX_NAME, + 'mapping' => $this->getMapping() + ] + ) + ); + + $bulkBody = []; + + foreach ($this->getDataArray() as $type => $documents) { + foreach ($documents as $id => $document) { + $bulkBody[] = [ + 'index' => [ + '_index' => self::INDEX_NAME, + '_type' => $type, + '_id' => $id, + ] + ]; + $bulkBody[] = $document; + } + } + + $this->client->bulk( + [ + 'body' => $bulkBody + ] + ); + $this->client->indices()->refresh(); + } + + private function deleteIndex() + { + try { + $this->client->indices()->delete(['index' => self::INDEX_NAME]); + } catch (\Exception $e) { + // Do nothing. + } + } + + /** + * Defines index mapping for test index. + * Override this function in your test case and return array with mapping body. + * More info check here: https://goo.gl/zWBree + * + * @return array Mapping body + */ + protected function getMapping() + { + return []; + } + + /** + * Can be overwritten in child class to populate elasticsearch index with the data. + * + * Example: + * [ + * 'type_name' => [ + * 'custom_id' => [ + * 'title' => 'foo', + * ], + * 3 => [ + * '_id' => 2, + * 'title' => 'bar', + * ] + * ] + * ] + * Document _id can be set as it's id. + * + * @return array + */ + protected function getDataArray() + { + return []; + } + + /** + * {@inheritdoc} + */ + protected function tearDown() + { + parent::tearDown(); + $this->deleteIndex(); + } + + protected function executeSearch(Search $search, $type = null, $returnRaw = false) + { + $response = $this->client->search( + array_filter([ + 'index' => self::INDEX_NAME, + 'type' => $type, + 'body' => $search->toArray(), + ]) + ); + + if ($returnRaw) { + return $response; + } + + $documents = []; + + try { + foreach ($response['hits']['hits'] as $document) { + $documents[$document['_id']] = $document['_source']; + } + } catch (\Exception $e) { + return $documents; + } + + return $documents; + } +} diff --git a/tests/Functional/Query/MatchAllQueryTest.php b/tests/Functional/Query/MatchAllQueryTest.php new file mode 100644 index 0000000000000000000000000000000000000000..b0f8497e678489e6c592efd2ba5078f0dca8258d --- /dev/null +++ b/tests/Functional/Query/MatchAllQueryTest.php @@ -0,0 +1,51 @@ +<?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); + + $results = $this->executeSearch($search); + + $this->assertEquals($this->getDataArray()['product'], $results); + } +} diff --git a/tests/Aggregation/CardinalityAggregationTest.php b/tests/Unit/Aggregation/CardinalityAggregationTest.php similarity index 97% rename from tests/Aggregation/CardinalityAggregationTest.php rename to tests/Unit/Aggregation/CardinalityAggregationTest.php index 934f2743dadd86cabe6e4d134939ea58a8dfc996..4cf5d1d23017bccc10a3c285791d85b295fa2a90 100644 --- a/tests/Aggregation/CardinalityAggregationTest.php +++ b/tests/Unit/Aggregation/CardinalityAggregationTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace ONGR\ElasticsearchDSL\Tests\Aggregation; +namespace ONGR\ElasticsearchDSL\Tests\Unit\Aggregation; use ONGR\ElasticsearchDSL\Aggregation\CardinalityAggregation; diff --git a/tests/Aggregation/ChildrenAggregationTest.php b/tests/Unit/Aggregation/ChildrenAggregationTest.php similarity index 96% rename from tests/Aggregation/ChildrenAggregationTest.php rename to tests/Unit/Aggregation/ChildrenAggregationTest.php index 89eeced273842f01835a75a11cca86a767f08766..dd5cd63757857b351ff76b66a2139a9621b39017 100644 --- a/tests/Aggregation/ChildrenAggregationTest.php +++ b/tests/Unit/Aggregation/ChildrenAggregationTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace ONGR\ElasticsearchDSL\Tests\Aggregation; +namespace ONGR\ElasticsearchDSL\Tests\Unit\Aggregation; use ONGR\ElasticsearchDSL\Aggregation\ChildrenAggregation; diff --git a/tests/Aggregation/DateHistogramAggregationTest.php b/tests/Unit/Aggregation/DateHistogramAggregationTest.php similarity index 96% rename from tests/Aggregation/DateHistogramAggregationTest.php rename to tests/Unit/Aggregation/DateHistogramAggregationTest.php index 50f1643451b55d431f38af4ebf7160c6e5561b43..5845f8867fd9e003824c631f0a59fc2d0e3336eb 100644 --- a/tests/Aggregation/DateHistogramAggregationTest.php +++ b/tests/Unit/Aggregation/DateHistogramAggregationTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace ONGR\ElasticsearchDSL\Tests\Aggregation; +namespace ONGR\ElasticsearchDSL\Tests\Unit\Aggregation; use ONGR\ElasticsearchDSL\Aggregation\DateHistogramAggregation; diff --git a/tests/Aggregation/DateRangeAggregationTest.php b/tests/Unit/Aggregation/DateRangeAggregationTest.php similarity index 98% rename from tests/Aggregation/DateRangeAggregationTest.php rename to tests/Unit/Aggregation/DateRangeAggregationTest.php index 718f8a85a590d37dae20d1592874d9396f25c779..03afc285223cc722dae3f208b78fbc843ebebc35 100644 --- a/tests/Aggregation/DateRangeAggregationTest.php +++ b/tests/Unit/Aggregation/DateRangeAggregationTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace ONGR\ElasticsearchDSL\Tests\Aggregation; +namespace ONGR\ElasticsearchDSL\Tests\Unit\Aggregation; use ONGR\ElasticsearchDSL\Aggregation\DateRangeAggregation; diff --git a/tests/Aggregation/FilterAggregationTest.php b/tests/Unit/Aggregation/FilterAggregationTest.php similarity index 98% rename from tests/Aggregation/FilterAggregationTest.php rename to tests/Unit/Aggregation/FilterAggregationTest.php index fcc432d317fab683cf57ccb2bae3b189cb82f2c9..cf36bd770f16a203507de249ac258f053c6c9a86 100644 --- a/tests/Aggregation/FilterAggregationTest.php +++ b/tests/Unit/Aggregation/FilterAggregationTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace ONGR\ElasticsearchDSL\Tests\Aggregation; +namespace ONGR\ElasticsearchDSL\Tests\Unit\Aggregation; use ONGR\ElasticsearchDSL\Aggregation\FilterAggregation; use ONGR\ElasticsearchDSL\Aggregation\HistogramAggregation; diff --git a/tests/Aggregation/FiltersAggregationTest.php b/tests/Unit/Aggregation/FiltersAggregationTest.php similarity index 98% rename from tests/Aggregation/FiltersAggregationTest.php rename to tests/Unit/Aggregation/FiltersAggregationTest.php index cb05d9222a1dd7f594e3dc868734fb4fec4aed97..b487fd9ced6070fa132c535363e672c91f560172 100644 --- a/tests/Aggregation/FiltersAggregationTest.php +++ b/tests/Unit/Aggregation/FiltersAggregationTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace ONGR\ElasticsearchDSL\Tests\Aggregation; +namespace ONGR\ElasticsearchDSL\Tests\Unit\Aggregation; use ONGR\ElasticsearchDSL\Aggregation\FiltersAggregation; use ONGR\ElasticsearchDSL\BuilderInterface; diff --git a/tests/Aggregation/GeoBoundsAggregationTest.php b/tests/Unit/Aggregation/GeoBoundsAggregationTest.php similarity index 96% rename from tests/Aggregation/GeoBoundsAggregationTest.php rename to tests/Unit/Aggregation/GeoBoundsAggregationTest.php index 24376fb71fce5cdbf1f9a2a2070a1d182299db9d..505b9125029374baff6be691effabee8e345f501 100644 --- a/tests/Aggregation/GeoBoundsAggregationTest.php +++ b/tests/Unit/Aggregation/GeoBoundsAggregationTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace ONGR\ElasticsearchDSL\Tests\Aggregation; +namespace ONGR\ElasticsearchDSL\Tests\Unit\Aggregation; use ONGR\ElasticsearchDSL\Aggregation\AbstractAggregation; use ONGR\ElasticsearchDSL\Aggregation\GeoBoundsAggregation; diff --git a/tests/Aggregation/GeoCentroidAggregationTest.php b/tests/Unit/Aggregation/GeoCentroidAggregationTest.php similarity index 95% rename from tests/Aggregation/GeoCentroidAggregationTest.php rename to tests/Unit/Aggregation/GeoCentroidAggregationTest.php index e8d6ea9f52e66db4ae8253155f8447169a8c8c51..a28a16ce72384bbfc93e5743028ca037e02e4a15 100644 --- a/tests/Aggregation/GeoCentroidAggregationTest.php +++ b/tests/Unit/Aggregation/GeoCentroidAggregationTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace ONGR\ElasticsearchDSL\Tests\Aggregation; +namespace ONGR\ElasticsearchDSL\Tests\Unit\Aggregation; use ONGR\ElasticsearchDSL\Aggregation\GeoCentroidAggregation; diff --git a/tests/Aggregation/GeoDistanceAggregationTest.php b/tests/Unit/Aggregation/GeoDistanceAggregationTest.php similarity index 98% rename from tests/Aggregation/GeoDistanceAggregationTest.php rename to tests/Unit/Aggregation/GeoDistanceAggregationTest.php index 513f246b552931f07ec376cf243ffa5b5e3bd689..1c5d21b68586e8691f830722f22a28734ded2fd9 100644 --- a/tests/Aggregation/GeoDistanceAggregationTest.php +++ b/tests/Unit/Aggregation/GeoDistanceAggregationTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace ONGR\ElasticsearchDSL\Tests\Aggregation; +namespace ONGR\ElasticsearchDSL\Tests\Unit\Aggregation; use ONGR\ElasticsearchDSL\Aggregation\GeoDistanceAggregation; diff --git a/tests/Aggregation/GeoHashGridAggregationTest.php b/tests/Unit/Aggregation/GeoHashGridAggregationTest.php similarity index 97% rename from tests/Aggregation/GeoHashGridAggregationTest.php rename to tests/Unit/Aggregation/GeoHashGridAggregationTest.php index e97a022b6919668df575e80037e9f7a0468ec14a..499d642d6d44e67308ccda4126412a0a7805274a 100644 --- a/tests/Aggregation/GeoHashGridAggregationTest.php +++ b/tests/Unit/Aggregation/GeoHashGridAggregationTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace ONGR\ElasticsearchDSL\Tests\Aggregation; +namespace ONGR\ElasticsearchDSL\Tests\Unit\Aggregation; use ONGR\ElasticsearchDSL\Aggregation\GeoHashGridAggregation; diff --git a/tests/Aggregation/GlobalAggregationTest.php b/tests/Unit/Aggregation/GlobalAggregationTest.php similarity index 97% rename from tests/Aggregation/GlobalAggregationTest.php rename to tests/Unit/Aggregation/GlobalAggregationTest.php index b2e8850053b383933948a1fbd3a745f95dbc999c..40e101e5d298e4f1fcd9de424af49ac665e62da5 100644 --- a/tests/Aggregation/GlobalAggregationTest.php +++ b/tests/Unit/Aggregation/GlobalAggregationTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace ONGR\ElasticsearchDSL\Tests\Aggregation; +namespace ONGR\ElasticsearchDSL\Tests\Unit\Aggregation; use ONGR\ElasticsearchDSL\Aggregation\GlobalAggregation; diff --git a/tests/Aggregation/Ipv4RangeAggregationTest.php b/tests/Unit/Aggregation/Ipv4RangeAggregationTest.php similarity index 96% rename from tests/Aggregation/Ipv4RangeAggregationTest.php rename to tests/Unit/Aggregation/Ipv4RangeAggregationTest.php index 0582f68082862f7a8cdd4a560cd8d0f3773b1a62..4d42c4143a0385f9cdbe068604160eafd39b2a93 100644 --- a/tests/Aggregation/Ipv4RangeAggregationTest.php +++ b/tests/Unit/Aggregation/Ipv4RangeAggregationTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace ONGR\ElasticsearchDSL\Tests\Aggregation; +namespace ONGR\ElasticsearchDSL\Tests\Unit\Aggregation; use ONGR\ElasticsearchDSL\Aggregation\AbstractAggregation; use ONGR\ElasticsearchDSL\Aggregation\Ipv4RangeAggregation; diff --git a/tests/Aggregation/MissingAggregationTest.php b/tests/Unit/Aggregation/MissingAggregationTest.php similarity index 95% rename from tests/Aggregation/MissingAggregationTest.php rename to tests/Unit/Aggregation/MissingAggregationTest.php index ffa66d57c6f2b9cfbc2113e00fee91c4c4213f93..ed8d222cde0c7b88aa7338c09c27536273611e81 100644 --- a/tests/Aggregation/MissingAggregationTest.php +++ b/tests/Unit/Aggregation/MissingAggregationTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace ONGR\ElasticsearchDSL\Tests\Aggregation; +namespace ONGR\ElasticsearchDSL\Tests\Unit\Aggregation; use ONGR\ElasticsearchDSL\Aggregation\MissingAggregation; diff --git a/tests/Aggregation/NestedAggregationTest.php b/tests/Unit/Aggregation/NestedAggregationTest.php similarity index 94% rename from tests/Aggregation/NestedAggregationTest.php rename to tests/Unit/Aggregation/NestedAggregationTest.php index 874c299857ab75440eac142d956bc2a42dcff568..f24a00277f4ec56bbd28f5688718b185108f6d2b 100644 --- a/tests/Aggregation/NestedAggregationTest.php +++ b/tests/Unit/Aggregation/NestedAggregationTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace ONGR\ElasticsearchDSL\Tests\Aggregation; +namespace ONGR\ElasticsearchDSL\Tests\Unit\Aggregation; use ONGR\ElasticsearchDSL\Aggregation\NestedAggregation; use ONGR\ElasticsearchDSL\Aggregation\TermsAggregation; diff --git a/tests/Aggregation/PercentileRanksAggregationTest.php b/tests/Unit/Aggregation/PercentileRanksAggregationTest.php similarity index 97% rename from tests/Aggregation/PercentileRanksAggregationTest.php rename to tests/Unit/Aggregation/PercentileRanksAggregationTest.php index e2f8914c2d0964384e23e721c33550eebb6b7e83..8c71bbd16e3ac59fb7fc755f63d13d0365fb367d 100644 --- a/tests/Aggregation/PercentileRanksAggregationTest.php +++ b/tests/Unit/Aggregation/PercentileRanksAggregationTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace ONGR\ElasticsearchDSL\Tests\Aggregation; +namespace ONGR\ElasticsearchDSL\Tests\Unit\Aggregation; use ONGR\ElasticsearchDSL\Aggregation\AbstractAggregation; use ONGR\ElasticsearchDSL\Aggregation\PercentileRanksAggregation; diff --git a/tests/Aggregation/PercentilesAggregationTest.php b/tests/Unit/Aggregation/PercentilesAggregationTest.php similarity index 96% rename from tests/Aggregation/PercentilesAggregationTest.php rename to tests/Unit/Aggregation/PercentilesAggregationTest.php index 2357f356034461862e09edf43495ad38e9f3a749..a7c4fff44626429a9813e73a18d0f7764cdc1265 100644 --- a/tests/Aggregation/PercentilesAggregationTest.php +++ b/tests/Unit/Aggregation/PercentilesAggregationTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace ONGR\ElasticsearchDSL\Tests\Aggregation; +namespace ONGR\ElasticsearchDSL\Tests\Unit\Aggregation; use ONGR\ElasticsearchDSL\Aggregation\PercentilesAggregation; diff --git a/tests/Aggregation/Pipeline/AvgBucketAggregationTest.php b/tests/Unit/Aggregation/Pipeline/AvgBucketAggregationTest.php similarity index 93% rename from tests/Aggregation/Pipeline/AvgBucketAggregationTest.php rename to tests/Unit/Aggregation/Pipeline/AvgBucketAggregationTest.php index 05a350ccb0533e7094c9f54a3ebd1d4f7ccd9596..e4682245fdc28d80d2767cd4fd7af92d0dd9a667 100644 --- a/tests/Aggregation/Pipeline/AvgBucketAggregationTest.php +++ b/tests/Unit/Aggregation/Pipeline/AvgBucketAggregationTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace ONGR\ElasticsearchDSL\Tests\Aggregation\Pipeline; +namespace ONGR\ElasticsearchDSL\Tests\Unit\Aggregation\Pipeline; use ONGR\ElasticsearchDSL\Aggregation\Pipeline\AvgBucketAggregation; diff --git a/tests/Aggregation/Pipeline/BucketScriptAggregationTest.php b/tests/Unit/Aggregation/Pipeline/BucketScriptAggregationTest.php similarity index 96% rename from tests/Aggregation/Pipeline/BucketScriptAggregationTest.php rename to tests/Unit/Aggregation/Pipeline/BucketScriptAggregationTest.php index 5dd8a05aa20f2f81696a978f19a7550350c39400..8f75353079e421c1e21663a1b0ac3c41168e89d5 100644 --- a/tests/Aggregation/Pipeline/BucketScriptAggregationTest.php +++ b/tests/Unit/Aggregation/Pipeline/BucketScriptAggregationTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace ONGR\ElasticsearchDSL\Tests\Aggregation\Pipeline; +namespace ONGR\ElasticsearchDSL\Tests\Unit\Aggregation\Pipeline; use ONGR\ElasticsearchDSL\Aggregation\Pipeline\BucketScriptAggregation; diff --git a/tests/Aggregation/Pipeline/BucketSelectorAggregationTest.php b/tests/Unit/Aggregation/Pipeline/BucketSelectorAggregationTest.php similarity index 95% rename from tests/Aggregation/Pipeline/BucketSelectorAggregationTest.php rename to tests/Unit/Aggregation/Pipeline/BucketSelectorAggregationTest.php index 559c2d9b1cebde33d39c59dd39fae96c9416f23b..d54f61fa85c4146f2463b81ac9ce1e0b452885fb 100644 --- a/tests/Aggregation/Pipeline/BucketSelectorAggregationTest.php +++ b/tests/Unit/Aggregation/Pipeline/BucketSelectorAggregationTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace ONGR\ElasticsearchDSL\Tests\Aggregation\Pipeline; +namespace ONGR\ElasticsearchDSL\Tests\Unit\Aggregation\Pipeline; use ONGR\ElasticsearchDSL\Aggregation\Pipeline\BucketSelectorAggregation; diff --git a/tests/Aggregation/Pipeline/CumulativeSumAggregationTest.php b/tests/Unit/Aggregation/Pipeline/CumulativeSumAggregationTest.php similarity index 92% rename from tests/Aggregation/Pipeline/CumulativeSumAggregationTest.php rename to tests/Unit/Aggregation/Pipeline/CumulativeSumAggregationTest.php index b2214a1bd5cf4416086209675f77ff18651f0b60..e5cebf8a36ba51631e1d95fdd7c7e73367cc04d3 100644 --- a/tests/Aggregation/Pipeline/CumulativeSumAggregationTest.php +++ b/tests/Unit/Aggregation/Pipeline/CumulativeSumAggregationTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace ONGR\ElasticsearchDSL\Tests\Aggregation\Pipeline; +namespace ONGR\ElasticsearchDSL\Tests\Unit\Aggregation\Pipeline; use ONGR\ElasticsearchDSL\Aggregation\Pipeline\CumulativeSumAggregation; diff --git a/tests/Aggregation/Pipeline/DerivativeAggregationTest.php b/tests/Unit/Aggregation/Pipeline/DerivativeAggregationTest.php similarity index 93% rename from tests/Aggregation/Pipeline/DerivativeAggregationTest.php rename to tests/Unit/Aggregation/Pipeline/DerivativeAggregationTest.php index 2f7748e682a14f3f9bbef1485e513f5f6040487a..ada4424e65e0575473e443b22cda7d6803a8ee70 100644 --- a/tests/Aggregation/Pipeline/DerivativeAggregationTest.php +++ b/tests/Unit/Aggregation/Pipeline/DerivativeAggregationTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace ONGR\ElasticsearchDSL\Tests\Aggregation\Pipeline; +namespace ONGR\ElasticsearchDSL\Tests\Unit\Aggregation\Pipeline; use ONGR\ElasticsearchDSL\Aggregation\Pipeline\DerivativeAggregation; diff --git a/tests/Aggregation/Pipeline/ExtendedStatsBucketAggregationTest.php b/tests/Unit/Aggregation/Pipeline/ExtendedStatsBucketAggregationTest.php similarity index 92% rename from tests/Aggregation/Pipeline/ExtendedStatsBucketAggregationTest.php rename to tests/Unit/Aggregation/Pipeline/ExtendedStatsBucketAggregationTest.php index 48689073b22ba01899d0a10d7eb4127fbf78a995..de15f1053ebcf42e65c7dce827ff1eaf3e905283 100644 --- a/tests/Aggregation/Pipeline/ExtendedStatsBucketAggregationTest.php +++ b/tests/Unit/Aggregation/Pipeline/ExtendedStatsBucketAggregationTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace ONGR\ElasticsearchDSL\Tests\Aggregation\Pipeline; +namespace ONGR\ElasticsearchDSL\Tests\Unit\Aggregation\Pipeline; use ONGR\ElasticsearchDSL\Aggregation\Pipeline\ExtendedStatsBucketAggregation; diff --git a/tests/Aggregation/Pipeline/MaxBucketAggregationTest.php b/tests/Unit/Aggregation/Pipeline/MaxBucketAggregationTest.php similarity index 92% rename from tests/Aggregation/Pipeline/MaxBucketAggregationTest.php rename to tests/Unit/Aggregation/Pipeline/MaxBucketAggregationTest.php index 72cc292de63e0ff41bb5c548d47f3375d269be52..a5f9d07db9fe3bcfb1037618f1b3f22370bb00d3 100644 --- a/tests/Aggregation/Pipeline/MaxBucketAggregationTest.php +++ b/tests/Unit/Aggregation/Pipeline/MaxBucketAggregationTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace ONGR\ElasticsearchDSL\Tests\Aggregation\Pipeline; +namespace ONGR\ElasticsearchDSL\Tests\Unit\Aggregation\Pipeline; use ONGR\ElasticsearchDSL\Aggregation\Pipeline\MaxBucketAggregation; diff --git a/tests/Aggregation/Pipeline/MinBucketAggregationTest.php b/tests/Unit/Aggregation/Pipeline/MinBucketAggregationTest.php similarity index 92% rename from tests/Aggregation/Pipeline/MinBucketAggregationTest.php rename to tests/Unit/Aggregation/Pipeline/MinBucketAggregationTest.php index 06323e4fd7c5bfbe0044a420c14c4bd358ed9d5c..c570569bf51e614357e38149c0364556aea66ee6 100644 --- a/tests/Aggregation/Pipeline/MinBucketAggregationTest.php +++ b/tests/Unit/Aggregation/Pipeline/MinBucketAggregationTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace ONGR\ElasticsearchDSL\Tests\Aggregation\Pipeline; +namespace ONGR\ElasticsearchDSL\Tests\Unit\Aggregation\Pipeline; use ONGR\ElasticsearchDSL\Aggregation\Pipeline\MinBucketAggregation; diff --git a/tests/Aggregation/Pipeline/PercentilesBucketAggregationTest.php b/tests/Unit/Aggregation/Pipeline/PercentilesBucketAggregationTest.php similarity index 93% rename from tests/Aggregation/Pipeline/PercentilesBucketAggregationTest.php rename to tests/Unit/Aggregation/Pipeline/PercentilesBucketAggregationTest.php index d4f740f172502ec72b652b4662b421f2c14fd87e..ae94d775cb6334ffe1ff8d1ca1e31cc4ed88df91 100644 --- a/tests/Aggregation/Pipeline/PercentilesBucketAggregationTest.php +++ b/tests/Unit/Aggregation/Pipeline/PercentilesBucketAggregationTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace ONGR\ElasticsearchDSL\Tests\Aggregation\Pipeline; +namespace ONGR\ElasticsearchDSL\Tests\Unit\Aggregation\Pipeline; use ONGR\ElasticsearchDSL\Aggregation\Pipeline\PercentilesBucketAggregation; diff --git a/tests/Aggregation/Pipeline/SerialDifferencingAggregationTest.php b/tests/Unit/Aggregation/Pipeline/SerialDifferencingAggregationTest.php similarity index 93% rename from tests/Aggregation/Pipeline/SerialDifferencingAggregationTest.php rename to tests/Unit/Aggregation/Pipeline/SerialDifferencingAggregationTest.php index aa52044634afbf46d34670fc44145b9b1470967e..77e75e895f62c8c025ba3e28e61690992aad57f9 100644 --- a/tests/Aggregation/Pipeline/SerialDifferencingAggregationTest.php +++ b/tests/Unit/Aggregation/Pipeline/SerialDifferencingAggregationTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace ONGR\ElasticsearchDSL\Tests\Aggregation\Pipeline; +namespace ONGR\ElasticsearchDSL\Tests\Unit\Aggregation\Pipeline; use ONGR\ElasticsearchDSL\Aggregation\Pipeline\SerialDifferencingAggregation; diff --git a/tests/Aggregation/Pipeline/StatsBucketAggregationTest.php b/tests/Unit/Aggregation/Pipeline/StatsBucketAggregationTest.php similarity index 92% rename from tests/Aggregation/Pipeline/StatsBucketAggregationTest.php rename to tests/Unit/Aggregation/Pipeline/StatsBucketAggregationTest.php index 47fa412a9fe3f7662b1813f80cf5a36a171e5687..876ee8d5e76f2c86be2639cda17dc66ad2d14ce0 100644 --- a/tests/Aggregation/Pipeline/StatsBucketAggregationTest.php +++ b/tests/Unit/Aggregation/Pipeline/StatsBucketAggregationTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace ONGR\ElasticsearchDSL\Tests\Aggregation\Pipeline; +namespace ONGR\ElasticsearchDSL\Tests\Unit\Aggregation\Pipeline; use ONGR\ElasticsearchDSL\Aggregation\Pipeline\StatsBucketAggregation; diff --git a/tests/Aggregation/Pipeline/SumBucketAggregationTest.php b/tests/Unit/Aggregation/Pipeline/SumBucketAggregationTest.php similarity index 92% rename from tests/Aggregation/Pipeline/SumBucketAggregationTest.php rename to tests/Unit/Aggregation/Pipeline/SumBucketAggregationTest.php index a909354137c9f59ef7ce31a2ab7aca1e00a8d12e..2ee9a4a3b131aa657a3dbd03b820620fa1af46ce 100644 --- a/tests/Aggregation/Pipeline/SumBucketAggregationTest.php +++ b/tests/Unit/Aggregation/Pipeline/SumBucketAggregationTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace ONGR\ElasticsearchDSL\Tests\Aggregation\Pipeline; +namespace ONGR\ElasticsearchDSL\Tests\Unit\Aggregation\Pipeline; use ONGR\ElasticsearchDSL\Aggregation\Pipeline\SumBucketAggregation; diff --git a/tests/Aggregation/RangeAggregationTest.php b/tests/Unit/Aggregation/RangeAggregationTest.php similarity index 99% rename from tests/Aggregation/RangeAggregationTest.php rename to tests/Unit/Aggregation/RangeAggregationTest.php index 9ee23c16c4a18e428d61d8636fbdaede86788754..70ee5cca3e7f59a08d3fb2da8a843b9561f42dbe 100644 --- a/tests/Aggregation/RangeAggregationTest.php +++ b/tests/Unit/Aggregation/RangeAggregationTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace ONGR\ElasticsearchDSL\Tests\Aggregation; +namespace ONGR\ElasticsearchDSL\Tests\Unit\Aggregation; use ONGR\ElasticsearchDSL\Aggregation\AbstractAggregation; use ONGR\ElasticsearchDSL\Aggregation\RangeAggregation; diff --git a/tests/Aggregation/ReverseNestedAggregationTest.php b/tests/Unit/Aggregation/ReverseNestedAggregationTest.php similarity index 97% rename from tests/Aggregation/ReverseNestedAggregationTest.php rename to tests/Unit/Aggregation/ReverseNestedAggregationTest.php index 407073826addf87dabbd6c068f796c86b78cd255..a47aaeb208e5caa95a45a9102a3c0d80f58aaba8 100644 --- a/tests/Aggregation/ReverseNestedAggregationTest.php +++ b/tests/Unit/Aggregation/ReverseNestedAggregationTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace ONGR\ElasticsearchDSL\Tests\Aggregation; +namespace ONGR\ElasticsearchDSL\Tests\Unit\Aggregation; use ONGR\ElasticsearchDSL\Aggregation\AbstractAggregation; use ONGR\ElasticsearchDSL\Aggregation\ReverseNestedAggregation; diff --git a/tests/Aggregation/SamplerAggregationTest.php b/tests/Unit/Aggregation/SamplerAggregationTest.php similarity index 96% rename from tests/Aggregation/SamplerAggregationTest.php rename to tests/Unit/Aggregation/SamplerAggregationTest.php index 1f32157e0337b5507a7baafaefaf28c715f08d27..4ac64c8bbfae4c7f2e3fa001199cd7aa1ffa1547 100644 --- a/tests/Aggregation/SamplerAggregationTest.php +++ b/tests/Unit/Aggregation/SamplerAggregationTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace ONGR\ElasticsearchDSL\Tests\Aggregation; +namespace ONGR\ElasticsearchDSL\Tests\Unit\Aggregation; use ONGR\ElasticsearchDSL\Aggregation\SamplerAggregation; use ONGR\ElasticsearchDSL\Aggregation\TermsAggregation; diff --git a/tests/Aggregation/SignificantTermsAggregationTest.php b/tests/Unit/Aggregation/SignificantTermsAggregationTest.php similarity index 95% rename from tests/Aggregation/SignificantTermsAggregationTest.php rename to tests/Unit/Aggregation/SignificantTermsAggregationTest.php index 1406d4188d7bdf24c2cdbf34ace3203326683dd9..6f75c1be7dded42100550101be222a8013a98ac1 100644 --- a/tests/Aggregation/SignificantTermsAggregationTest.php +++ b/tests/Unit/Aggregation/SignificantTermsAggregationTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace ONGR\ElasticsearchDSL\Tests\Aggregation; +namespace ONGR\ElasticsearchDSL\Tests\Unit\Aggregation; use ONGR\ElasticsearchDSL\Aggregation\SignificantTermsAggregation; diff --git a/tests/Aggregation/StatsAggregationTest.php b/tests/Unit/Aggregation/StatsAggregationTest.php similarity index 95% rename from tests/Aggregation/StatsAggregationTest.php rename to tests/Unit/Aggregation/StatsAggregationTest.php index 8ed469b831266fb98424c80b87986430bed35129..4d98696984592f8c5c6f8029c60a9bb22f39aa28 100644 --- a/tests/Aggregation/StatsAggregationTest.php +++ b/tests/Unit/Aggregation/StatsAggregationTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace ONGR\ElasticsearchDSL\Tests\Aggregation; +namespace ONGR\ElasticsearchDSL\Tests\Unit\Aggregation; use ONGR\ElasticsearchDSL\Aggregation\AbstractAggregation; use ONGR\ElasticsearchDSL\Aggregation\StatsAggregation; diff --git a/tests/Aggregation/TermsAggregationTest.php b/tests/Unit/Aggregation/TermsAggregationTest.php similarity index 99% rename from tests/Aggregation/TermsAggregationTest.php rename to tests/Unit/Aggregation/TermsAggregationTest.php index dab248a0462d54033fdd74651fd0d5745869dda5..3d61d8f6084ea5eea529dee3a76575bee08f26ee 100644 --- a/tests/Aggregation/TermsAggregationTest.php +++ b/tests/Unit/Aggregation/TermsAggregationTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace ONGR\ElasticsearchDSL\Tests\Aggregation; +namespace ONGR\ElasticsearchDSL\Tests\Unit\Aggregation; use ONGR\ElasticsearchDSL\Aggregation\AbstractAggregation; use ONGR\ElasticsearchDSL\Aggregation\TermsAggregation; diff --git a/tests/Aggregation/TopHitsAggregationTest.php b/tests/Unit/Aggregation/TopHitsAggregationTest.php similarity index 96% rename from tests/Aggregation/TopHitsAggregationTest.php rename to tests/Unit/Aggregation/TopHitsAggregationTest.php index 70b18ae3657792d15f0cc51b04b630ddf0ad22d0..127e02b5a0ffa854837f415bd6f696b1b8ad72bc 100644 --- a/tests/Aggregation/TopHitsAggregationTest.php +++ b/tests/Unit/Aggregation/TopHitsAggregationTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace ONGR\ElasticsearchDSL\Tests\Aggregation; +namespace ONGR\ElasticsearchDSL\Tests\Unit\Aggregation; use ONGR\ElasticsearchDSL\Aggregation\TopHitsAggregation; use ONGR\ElasticsearchDSL\Sort\FieldSort; diff --git a/tests/BuilderBagTest.php b/tests/Unit/BuilderBagTest.php similarity index 98% rename from tests/BuilderBagTest.php rename to tests/Unit/BuilderBagTest.php index ec16fc0294180d1c750887ff6e78bb70012ce668..59270d1c4e47779e98cd92f132cb9f0ad575d37a 100644 --- a/tests/BuilderBagTest.php +++ b/tests/Unit/BuilderBagTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace ONGR\ElasticsearchDSL\Tests\Unit\DSL; +namespace ONGR\ElasticsearchDSL\Tests\Unit; use ONGR\ElasticsearchDSL\BuilderBag; use ONGR\ElasticsearchDSL\BuilderInterface; diff --git a/tests/Highlight/HighlightTest.php b/tests/Unit/Highlight/HighlightTest.php similarity index 98% rename from tests/Highlight/HighlightTest.php rename to tests/Unit/Highlight/HighlightTest.php index 1b75447bfd19eabcb9642c6d494cd6ac4f40517b..ede0f36f8ad7ad80ae7bd527a203002fe1e76795 100644 --- a/tests/Highlight/HighlightTest.php +++ b/tests/Unit/Highlight/HighlightTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace ONGR\ElasticsearchDSL\Tests\Highlight; +namespace ONGR\ElasticsearchDSL\Tests\Unit\Highlight; use ONGR\ElasticsearchDSL\Highlight\Highlight; diff --git a/tests/InnerHit/NestedInnerHitTest.php b/tests/Unit/InnerHit/NestedInnerHitTest.php similarity index 98% rename from tests/InnerHit/NestedInnerHitTest.php rename to tests/Unit/InnerHit/NestedInnerHitTest.php index c9bfe8a389f6845a6a70aaf8bc2a4fe32186be11..2d512341c5badf25a3d968045984ac57d1c3ef8d 100644 --- a/tests/InnerHit/NestedInnerHitTest.php +++ b/tests/Unit/InnerHit/NestedInnerHitTest.php @@ -1,6 +1,6 @@ <?php -namespace ONGR\ElasticsearchDSL\Tests\InnerHit; +namespace ONGR\ElasticsearchDSL\Tests\Unit\InnerHit; use ONGR\ElasticsearchDSL\InnerHit\NestedInnerHit; use ONGR\ElasticsearchDSL\Query\MatchQuery; diff --git a/tests/InnerHit/ParentInnerHitTest.php b/tests/Unit/InnerHit/ParentInnerHitTest.php similarity index 92% rename from tests/InnerHit/ParentInnerHitTest.php rename to tests/Unit/InnerHit/ParentInnerHitTest.php index 9444ec67a32d7d0875d6a28dad0616c0c787b27d..427a2a824abec5675fdbb8c743d9ea9a27d24213 100644 --- a/tests/InnerHit/ParentInnerHitTest.php +++ b/tests/Unit/InnerHit/ParentInnerHitTest.php @@ -1,6 +1,6 @@ <?php -namespace ONGR\ElasticsearchDSL\Tests\InnerHit; +namespace ONGR\ElasticsearchDSL\Tests\Unit\InnerHit; use ONGR\ElasticsearchDSL\InnerHit\ParentInnerHit; use ONGR\ElasticsearchDSL\Query\TermQuery; diff --git a/tests/Integration/SearchTest.php b/tests/Unit/Integration/SearchTest.php similarity index 98% rename from tests/Integration/SearchTest.php rename to tests/Unit/Integration/SearchTest.php index 9573f57b3b1e6382a5f4918cd73189e87dccd812..fb2c6e366f0eb06dfc6f41665fc5b082a9450af5 100644 --- a/tests/Integration/SearchTest.php +++ b/tests/Unit/Integration/SearchTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace ONGR\ElasticsearchDSL\Tests\Aggregation\Integration; +namespace ONGR\ElasticsearchDSL\Tests\Unit\Aggregation\Integration; use ONGR\ElasticsearchDSL\Aggregation\FiltersAggregation; use ONGR\ElasticsearchDSL\Aggregation\HistogramAggregation; diff --git a/tests/ParametersTraitTest.php b/tests/Unit/ParametersTraitTest.php similarity index 95% rename from tests/ParametersTraitTest.php rename to tests/Unit/ParametersTraitTest.php index e5d3c9fcdd748a3614e031454eeb92d7923da528..8b3e9f68ea70188b41bf74f86223794f3bda3fb7 100644 --- a/tests/ParametersTraitTest.php +++ b/tests/Unit/ParametersTraitTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace ONGR\ElasticsearchDSL\Tests\Unit\DSL; +namespace ONGR\ElasticsearchDSL\Tests\Unit; use ONGR\ElasticsearchDSL\ParametersTrait; diff --git a/tests/Query/BoolQueryTest.php b/tests/Unit/Query/BoolQueryTest.php similarity index 98% rename from tests/Query/BoolQueryTest.php rename to tests/Unit/Query/BoolQueryTest.php index 738bada3c021f0a05fc23216c201cd14a0a70735..2d3da88ece2957bbd994e149316cb648555e811f 100644 --- a/tests/Query/BoolQueryTest.php +++ b/tests/Unit/Query/BoolQueryTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace ONGR\ElasticsearchDSL\Tests\Query; +namespace ONGR\ElasticsearchDSL\Tests\Unit\Query; use ONGR\ElasticsearchDSL\Query\BoolQuery; use ONGR\ElasticsearchDSL\Query\MatchAllQuery; diff --git a/tests/Query/BoostingQueryTest.php b/tests/Unit/Query/BoostingQueryTest.php similarity index 95% rename from tests/Query/BoostingQueryTest.php rename to tests/Unit/Query/BoostingQueryTest.php index 516f9b1ecb5a2d9fa412af9dc3409d184d35c30e..b9a19de903710a64a883db406f6d0c84766b0748 100644 --- a/tests/Query/BoostingQueryTest.php +++ b/tests/Unit/Query/BoostingQueryTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace ONGR\ElasticsearchDSL\Tests\Query; +namespace ONGR\ElasticsearchDSL\Tests\Unit\Query; use ONGR\ElasticsearchDSL\Query\BoostingQuery; diff --git a/tests/Query/CommonTermsQueryTest.php b/tests/Unit/Query/CommonTermsQueryTest.php similarity index 94% rename from tests/Query/CommonTermsQueryTest.php rename to tests/Unit/Query/CommonTermsQueryTest.php index 749bb583068b484e0e6acf7fc9ba178bbc084366..e25dd552f7b829d847a04ba16a0fa3bd12cff138 100644 --- a/tests/Query/CommonTermsQueryTest.php +++ b/tests/Unit/Query/CommonTermsQueryTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace ONGR\ElasticsearchDSL\Tests\Query; +namespace ONGR\ElasticsearchDSL\Tests\Unit\Query; use ONGR\ElasticsearchDSL\Query\CommonTermsQuery; diff --git a/tests/Query/ConstantScoreQueryTest.php b/tests/Unit/Query/ConstantScoreQueryTest.php similarity index 95% rename from tests/Query/ConstantScoreQueryTest.php rename to tests/Unit/Query/ConstantScoreQueryTest.php index 4c4fdb68130ca89af2225b2feda154f7d548c736..a8c7128aa38e42361761792d37409c0ffc516e8f 100644 --- a/tests/Query/ConstantScoreQueryTest.php +++ b/tests/Unit/Query/ConstantScoreQueryTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace ONGR\ElasticsearchDSL\Tests\Query; +namespace ONGR\ElasticsearchDSL\Tests\Unit\Query; use ONGR\ElasticsearchDSL\Query\ConstantScoreQuery; diff --git a/tests/Query/DisMaxQueryTest.php b/tests/Unit/Query/DisMaxQueryTest.php similarity index 95% rename from tests/Query/DisMaxQueryTest.php rename to tests/Unit/Query/DisMaxQueryTest.php index 8c5e442defe1101664f36d68e8968899c40dcf98..8b47d573276000bc140b22c2187466bb1f29794b 100644 --- a/tests/Query/DisMaxQueryTest.php +++ b/tests/Unit/Query/DisMaxQueryTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace ONGR\ElasticsearchDSL\Tests\Query; +namespace ONGR\ElasticsearchDSL\Tests\Unit\Query; use ONGR\ElasticsearchDSL\Query\DisMaxQuery; diff --git a/tests/Query/ExistsQueryTest.php b/tests/Unit/Query/ExistsQueryTest.php similarity index 92% rename from tests/Query/ExistsQueryTest.php rename to tests/Unit/Query/ExistsQueryTest.php index 292b8adb39e5e97b80a6486aa5ebf9d338512e68..99138b011e58e46284777fbfc20889de32afc5a7 100644 --- a/tests/Query/ExistsQueryTest.php +++ b/tests/Unit/Query/ExistsQueryTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace ONGR\ElasticsearchDSL\Tests\Query; +namespace ONGR\ElasticsearchDSL\Tests\Unit\Query; use ONGR\ElasticsearchDSL\Query\ExistsQuery; diff --git a/tests/Query/FunctionScoreQueryTest.php b/tests/Unit/Query/FunctionScoreQueryTest.php similarity index 98% rename from tests/Query/FunctionScoreQueryTest.php rename to tests/Unit/Query/FunctionScoreQueryTest.php index 5f0bb5aeba0f28434973ab72e1f05892c4f94448..578b822949057bca612320deb9b0771290aa5e08 100644 --- a/tests/Query/FunctionScoreQueryTest.php +++ b/tests/Unit/Query/FunctionScoreQueryTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace ONGR\ElasticsearchDSL\Tests\Query; +namespace ONGR\ElasticsearchDSL\Tests\Unit\Query; use ONGR\ElasticsearchDSL\BuilderInterface; use ONGR\ElasticsearchDSL\Query\FunctionScoreQuery; diff --git a/tests/Query/FuzzyQueryTest.php b/tests/Unit/Query/FuzzyQueryTest.php similarity index 93% rename from tests/Query/FuzzyQueryTest.php rename to tests/Unit/Query/FuzzyQueryTest.php index 16edbf7a8891035993184f2c8d97ffc24c435fe5..7b1b3b5c13253927960d85d162d56838ba85ff23 100644 --- a/tests/Query/FuzzyQueryTest.php +++ b/tests/Unit/Query/FuzzyQueryTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace ONGR\ElasticsearchDSL\Tests\Query; +namespace ONGR\ElasticsearchDSL\Tests\Unit\Query; use ONGR\ElasticsearchDSL\Query\FuzzyQuery; diff --git a/tests/Query/GeoBoundingBoxQueryTest.php b/tests/Unit/Query/GeoBoundingBoxQueryTest.php similarity index 97% rename from tests/Query/GeoBoundingBoxQueryTest.php rename to tests/Unit/Query/GeoBoundingBoxQueryTest.php index c192fc8974ace721ce506e29ec322ee24a7f4ddf..c50cfafa0748612b49e118ca804cd39097879d51 100644 --- a/tests/Query/GeoBoundingBoxQueryTest.php +++ b/tests/Unit/Query/GeoBoundingBoxQueryTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace ONGR\ElasticsearchDSL\Tests\Query; +namespace ONGR\ElasticsearchDSL\Tests\Unit\Query; use ONGR\ElasticsearchDSL\Query\GeoBoundingBoxQuery; diff --git a/tests/Query/GeoDistanceQueryTest.php b/tests/Unit/Query/GeoDistanceQueryTest.php similarity index 97% rename from tests/Query/GeoDistanceQueryTest.php rename to tests/Unit/Query/GeoDistanceQueryTest.php index 496bec83ec769551e06891fb28507c311f3bb20a..c5b0412ba3d7b580f4825546000f190bef235baf 100644 --- a/tests/Query/GeoDistanceQueryTest.php +++ b/tests/Unit/Query/GeoDistanceQueryTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace ONGR\ElasticsearchDSL\Tests\Query; +namespace ONGR\ElasticsearchDSL\Tests\Unit\Query; use ONGR\ElasticsearchDSL\Query\GeoDistanceQuery; diff --git a/tests/Query/GeoDistanceRangeQueryTest.php b/tests/Unit/Query/GeoDistanceRangeQueryTest.php similarity index 97% rename from tests/Query/GeoDistanceRangeQueryTest.php rename to tests/Unit/Query/GeoDistanceRangeQueryTest.php index 039465830f80bac28e8929d9a01d7f7c6efef769..18502669b20bc749a292296924a76ea7e22cf7eb 100644 --- a/tests/Query/GeoDistanceRangeQueryTest.php +++ b/tests/Unit/Query/GeoDistanceRangeQueryTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace ONGR\ElasticsearchDSL\Tests\Query; +namespace ONGR\ElasticsearchDSL\Tests\Unit\Query; use ONGR\ElasticsearchDSL\Query\GeoDistanceRangeQuery; diff --git a/tests/Query/GeoPolygonQueryTest.php b/tests/Unit/Query/GeoPolygonQueryTest.php similarity index 97% rename from tests/Query/GeoPolygonQueryTest.php rename to tests/Unit/Query/GeoPolygonQueryTest.php index 3f8d09fbe33bd543a6c9a8b6c1b1195232160db1..5584bc78df640606c0ea636d49873f71273d0ec8 100644 --- a/tests/Query/GeoPolygonQueryTest.php +++ b/tests/Unit/Query/GeoPolygonQueryTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace ONGR\ElasticsearchDSL\Tests\Query; +namespace ONGR\ElasticsearchDSL\Tests\Unit\Query; use ONGR\ElasticsearchDSL\Query\GeoPolygonQuery; diff --git a/tests/Query/GeoShapeQueryTest.php b/tests/Unit/Query/GeoShapeQueryTest.php similarity index 97% rename from tests/Query/GeoShapeQueryTest.php rename to tests/Unit/Query/GeoShapeQueryTest.php index f18887857b91eb4197c279ab9ef9434edd27f125..870cd33c8b1f50644790776ce4ac46a4cd3d00ba 100644 --- a/tests/Query/GeoShapeQueryTest.php +++ b/tests/Unit/Query/GeoShapeQueryTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace ONGR\ElasticsearchDSL\Tests\Query; +namespace ONGR\ElasticsearchDSL\Tests\Unit\Query; use ONGR\ElasticsearchDSL\Query\GeoShapeQuery; diff --git a/tests/Query/GeohashCellQueryTest.php b/tests/Unit/Query/GeohashCellQueryTest.php similarity index 96% rename from tests/Query/GeohashCellQueryTest.php rename to tests/Unit/Query/GeohashCellQueryTest.php index 91687e63409d3a542d5d3c3990c825e0b82e512c..669cdc364d96bf118044934415bf511b1bc25630 100644 --- a/tests/Query/GeohashCellQueryTest.php +++ b/tests/Unit/Query/GeohashCellQueryTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace ONGR\ElasticsearchDSL\Tests\Query; +namespace ONGR\ElasticsearchDSL\Tests\Unit\Query; use ONGR\ElasticsearchDSL\Query\GeohashCellQuery; diff --git a/tests/Query/HasChildQueryTest.php b/tests/Unit/Query/HasChildQueryTest.php similarity index 93% rename from tests/Query/HasChildQueryTest.php rename to tests/Unit/Query/HasChildQueryTest.php index f7c15cf6b5b745e18ce17f9c44e32f0bbe45e3bc..d2870876fe9c3e19e73dfe0434c50feaef520edd 100644 --- a/tests/Query/HasChildQueryTest.php +++ b/tests/Unit/Query/HasChildQueryTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace ONGR\ElasticsearchDSL\Tests\Query; +namespace ONGR\ElasticsearchDSL\Tests\Unit\Query; use ONGR\ElasticsearchDSL\Query\HasChildQuery; diff --git a/tests/Query/HasParentQueryTest.php b/tests/Unit/Query/HasParentQueryTest.php similarity index 93% rename from tests/Query/HasParentQueryTest.php rename to tests/Unit/Query/HasParentQueryTest.php index d2069097c870fc64cde8abed2051f69018768ef1..04bb3a5030ab745f097d0f56fc426d21186de4cb 100644 --- a/tests/Query/HasParentQueryTest.php +++ b/tests/Unit/Query/HasParentQueryTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace ONGR\ElasticsearchDSL\Tests\Query; +namespace ONGR\ElasticsearchDSL\Tests\Unit\Query; use ONGR\ElasticsearchDSL\Query\HasParentQuery; diff --git a/tests/Query/IdsQueryTest.php b/tests/Unit/Query/IdsQueryTest.php similarity index 92% rename from tests/Query/IdsQueryTest.php rename to tests/Unit/Query/IdsQueryTest.php index f4ef6afc65437b0ff4442baa91f211bcbc719e8b..5db765029bb99f85e9d18240e31d79bf15993def 100644 --- a/tests/Query/IdsQueryTest.php +++ b/tests/Unit/Query/IdsQueryTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace ONGR\ElasticsearchDSL\Tests\Query; +namespace ONGR\ElasticsearchDSL\Tests\Unit\Query; use ONGR\ElasticsearchDSL\Query\IdsQuery; diff --git a/tests/Query/IndicesQueryTest.php b/tests/Unit/Query/IndicesQueryTest.php similarity index 97% rename from tests/Query/IndicesQueryTest.php rename to tests/Unit/Query/IndicesQueryTest.php index ba384a259f09279af8a8318e80699759aa6f312c..8618830cd1ee4b1b6529c1abcee05e62d205daf2 100644 --- a/tests/Query/IndicesQueryTest.php +++ b/tests/Unit/Query/IndicesQueryTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace ONGR\ElasticsearchDSL\Tests\Query; +namespace ONGR\ElasticsearchDSL\Tests\Unit\Query; use ONGR\ElasticsearchDSL\Query\IndicesQuery; diff --git a/tests/Query/LimitQueryTest.php b/tests/Unit/Query/LimitQueryTest.php similarity index 92% rename from tests/Query/LimitQueryTest.php rename to tests/Unit/Query/LimitQueryTest.php index d1ddcb93ff7b87dc76312955a124d91be71adcf3..a818e0b824d489f954832eb74a71bfb423955a05 100644 --- a/tests/Query/LimitQueryTest.php +++ b/tests/Unit/Query/LimitQueryTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace ONGR\ElasticsearchDSL\Tests\Query; +namespace ONGR\ElasticsearchDSL\Tests\Unit\Query; use ONGR\ElasticsearchDSL\Query\LimitQuery; diff --git a/tests/Query/MatchAllQueryTest.php b/tests/Unit/Query/MatchAllQueryTest.php similarity index 50% rename from tests/Query/MatchAllQueryTest.php rename to tests/Unit/Query/MatchAllQueryTest.php index 86c7caece450825d3fec6ab88cb82d02712c820b..f513818f7438f70b5168e56a886691ab04c61106 100644 --- a/tests/Query/MatchAllQueryTest.php +++ b/tests/Unit/Query/MatchAllQueryTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace ONGR\ElasticsearchDSL\Tests\Query; +namespace ONGR\ElasticsearchDSL\Tests\Unit\Query; use ONGR\ElasticsearchDSL\Query\MatchAllQuery; @@ -18,9 +18,19 @@ class MatchAllQueryTest extends \PHPUnit_Framework_TestCase /** * Tests toArray(). */ - public function testToArray() + public function testToArrayWhenThereAreNoParams() { $query = new MatchAllQuery(); - $this->assertEquals(['match_all' => []], $query->toArray()); + $this->assertEquals(['match_all' => new \stdClass()], $query->toArray()); + } + + /** + * Tests toArray(). + */ + public function testToArrayWithParams() + { + $params = ['boost' => 5]; + $query = new MatchAllQuery($params); + $this->assertEquals(['match_all' => $params], $query->toArray()); } } diff --git a/tests/Query/MatchPhrasePrefixQueryTest.php b/tests/Unit/Query/MatchPhrasePrefixQueryTest.php similarity index 94% rename from tests/Query/MatchPhrasePrefixQueryTest.php rename to tests/Unit/Query/MatchPhrasePrefixQueryTest.php index ea5c202ae6f487f18d4e7882bae6f9989f9b6f6c..5aa55d3c944d93c1fe2ecf840cb9b099b013f62e 100644 --- a/tests/Query/MatchPhrasePrefixQueryTest.php +++ b/tests/Unit/Query/MatchPhrasePrefixQueryTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace ONGR\ElasticsearchDSL\Tests\Query; +namespace ONGR\ElasticsearchDSL\Tests\Unit\Query; use ONGR\ElasticsearchDSL\Query\MatchPhrasePrefixQuery; use PHPUnit_Framework_TestCase; diff --git a/tests/Query/MatchPhraseQueryTest.php b/tests/Unit/Query/MatchPhraseQueryTest.php similarity index 93% rename from tests/Query/MatchPhraseQueryTest.php rename to tests/Unit/Query/MatchPhraseQueryTest.php index 74cf40b48431b53c6621807ea4bba62c0794d190..33570c789397b539044d2c107559e45c44045bb7 100644 --- a/tests/Query/MatchPhraseQueryTest.php +++ b/tests/Unit/Query/MatchPhraseQueryTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace ONGR\ElasticsearchDSL\Tests\Query; +namespace ONGR\ElasticsearchDSL\Tests\Unit\Query; use ONGR\ElasticsearchDSL\Query\MatchPhraseQuery; use PHPUnit_Framework_TestCase; diff --git a/tests/Query/MatchQueryTest.php b/tests/Unit/Query/MatchQueryTest.php similarity index 93% rename from tests/Query/MatchQueryTest.php rename to tests/Unit/Query/MatchQueryTest.php index af9597ba1310d6a76807f78cd08b7d3d03c77b70..162f26c4514144c5d5a13cc9825af7e4580cc2f5 100644 --- a/tests/Query/MatchQueryTest.php +++ b/tests/Unit/Query/MatchQueryTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace ONGR\ElasticsearchDSL\Tests\Query; +namespace ONGR\ElasticsearchDSL\Tests\Unit\Query; use ONGR\ElasticsearchDSL\Query\MatchQuery; diff --git a/tests/Query/MissingQueryTest.php b/tests/Unit/Query/MissingQueryTest.php similarity index 95% rename from tests/Query/MissingQueryTest.php rename to tests/Unit/Query/MissingQueryTest.php index 710af1795679efa3e057443cb6172766ac400e52..77e8f8aca67fa8bffd0d9c31ebdb981a436bfe85 100644 --- a/tests/Query/MissingQueryTest.php +++ b/tests/Unit/Query/MissingQueryTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace ONGR\ElasticsearchDSL\Tests\Query; +namespace ONGR\ElasticsearchDSL\Tests\Unit\Query; use ONGR\ElasticsearchDSL\Query\MissingQuery; diff --git a/tests/Query/MoreLikeThisQueryTest.php b/tests/Unit/Query/MoreLikeThisQueryTest.php similarity index 93% rename from tests/Query/MoreLikeThisQueryTest.php rename to tests/Unit/Query/MoreLikeThisQueryTest.php index 876c57eeda70e8e8886c9e03f2b1c32001256c76..89c10633121de1ad44b57f888b8c4cb9a24e8fe3 100644 --- a/tests/Query/MoreLikeThisQueryTest.php +++ b/tests/Unit/Query/MoreLikeThisQueryTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace ONGR\ElasticsearchDSL\Tests\Query; +namespace ONGR\ElasticsearchDSL\Tests\Unit\Query; use ONGR\ElasticsearchDSL\Query\MoreLikeThisQuery; diff --git a/tests/Query/MultiMatchQueryTest.php b/tests/Unit/Query/MultiMatchQueryTest.php similarity index 93% rename from tests/Query/MultiMatchQueryTest.php rename to tests/Unit/Query/MultiMatchQueryTest.php index 428625f2c1c90da2e38f4d61758e41126234b298..49c27b2109ed84b0de99aea347095774f5f3863f 100644 --- a/tests/Query/MultiMatchQueryTest.php +++ b/tests/Unit/Query/MultiMatchQueryTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace ONGR\ElasticsearchDSL\Tests\Query; +namespace ONGR\ElasticsearchDSL\Tests\Unit\Query; use ONGR\ElasticsearchDSL\Query\MultiMatchQuery; diff --git a/tests/Query/NestedQueryTest.php b/tests/Unit/Query/NestedQueryTest.php similarity index 97% rename from tests/Query/NestedQueryTest.php rename to tests/Unit/Query/NestedQueryTest.php index a5beaa02fc498bac87dd100fa30b13b12bb1c37c..a25360f9867c0652c7b94870aac28e4317e3e184 100644 --- a/tests/Query/NestedQueryTest.php +++ b/tests/Unit/Query/NestedQueryTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace ONGR\ElasticsearchDSL\Tests\Query; +namespace ONGR\ElasticsearchDSL\Tests\Unit\Query; use ONGR\ElasticsearchDSL\Query\NestedQuery; use ONGR\ElasticsearchDSL\Query\TermsQuery; diff --git a/tests/Query/PrefixQueryTest.php b/tests/Unit/Query/PrefixQueryTest.php similarity index 93% rename from tests/Query/PrefixQueryTest.php rename to tests/Unit/Query/PrefixQueryTest.php index 18e9183d2e8c25692012d2d577842104dcfab7c9..610756c73835a5908e34ee9d0b7295d34c8ea673 100644 --- a/tests/Query/PrefixQueryTest.php +++ b/tests/Unit/Query/PrefixQueryTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace ONGR\ElasticsearchDSL\Tests\Query; +namespace ONGR\ElasticsearchDSL\Tests\Unit\Query; use ONGR\ElasticsearchDSL\Query\PrefixQuery; diff --git a/tests/Query/QueryStringQueryTest.php b/tests/Unit/Query/QueryStringQueryTest.php similarity index 93% rename from tests/Query/QueryStringQueryTest.php rename to tests/Unit/Query/QueryStringQueryTest.php index c211bd622e2e1e5107733cc44f2d498948c1c2a3..864d7898fedf8d3206db329e093275f8847994ca 100644 --- a/tests/Query/QueryStringQueryTest.php +++ b/tests/Unit/Query/QueryStringQueryTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace ONGR\ElasticsearchDSL\Tests\Query; +namespace ONGR\ElasticsearchDSL\Tests\Unit\Query; use ONGR\ElasticsearchDSL\Query\QueryStringQuery; diff --git a/tests/Query/RangeQueryTest.php b/tests/Unit/Query/RangeQueryTest.php similarity index 93% rename from tests/Query/RangeQueryTest.php rename to tests/Unit/Query/RangeQueryTest.php index 430815f6af2fbfdaa6dd95dbdd1fe73a97ea80a9..97cfc93570a4d33dc68b3db5842f3016a8885947 100644 --- a/tests/Query/RangeQueryTest.php +++ b/tests/Unit/Query/RangeQueryTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace ONGR\ElasticsearchDSL\Tests\Query; +namespace ONGR\ElasticsearchDSL\Tests\Unit\Query; use ONGR\ElasticsearchDSL\Query\RangeQuery; diff --git a/tests/Query/RegexpQueryTest.php b/tests/Unit/Query/RegexpQueryTest.php similarity index 93% rename from tests/Query/RegexpQueryTest.php rename to tests/Unit/Query/RegexpQueryTest.php index c7c583af91970c5fd4d5d45fd5cd8a68f7d5c461..2636fb057fbf49a47013fe66920a83935f81ffd7 100644 --- a/tests/Query/RegexpQueryTest.php +++ b/tests/Unit/Query/RegexpQueryTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace ONGR\ElasticsearchDSL\Tests\Query; +namespace ONGR\ElasticsearchDSL\Tests\Unit\Query; use ONGR\ElasticsearchDSL\Query\RegexpQuery; diff --git a/tests/Query/ScriptQueryTest.php b/tests/Unit/Query/ScriptQueryTest.php similarity index 96% rename from tests/Query/ScriptQueryTest.php rename to tests/Unit/Query/ScriptQueryTest.php index 083ddf4778c3a9c73a0b027fc4f3a2243b043beb..c520bd2bcaca234af167a90baa645fb4731d3f5a 100644 --- a/tests/Query/ScriptQueryTest.php +++ b/tests/Unit/Query/ScriptQueryTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace ONGR\ElasticsearchDSL\Tests\Query; +namespace ONGR\ElasticsearchDSL\Tests\Unit\Query; use ONGR\ElasticsearchDSL\Query\ScriptQuery; diff --git a/tests/Query/SimpleQueryStringQueryTest.php b/tests/Unit/Query/SimpleQueryStringQueryTest.php similarity index 93% rename from tests/Query/SimpleQueryStringQueryTest.php rename to tests/Unit/Query/SimpleQueryStringQueryTest.php index a92aeb71024dc7655ddc9aca0e7c690c69887a6e..55e1ffb40e1330b89144b222d697964b2af6b1d2 100644 --- a/tests/Query/SimpleQueryStringQueryTest.php +++ b/tests/Unit/Query/SimpleQueryStringQueryTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace ONGR\ElasticsearchDSL\Tests\Query; +namespace ONGR\ElasticsearchDSL\Tests\Unit\Query; use ONGR\ElasticsearchDSL\Query\SimpleQueryStringQuery; diff --git a/tests/Query/Span/SpanContainingQueryTest.php b/tests/Unit/Query/Span/SpanContainingQueryTest.php similarity index 96% rename from tests/Query/Span/SpanContainingQueryTest.php rename to tests/Unit/Query/Span/SpanContainingQueryTest.php index d3a934b7a703a1879d3e3c9ce5d630cf785227bd..29b484184ad53da222acbff6cfe66c4dbdd53c35 100644 --- a/tests/Query/Span/SpanContainingQueryTest.php +++ b/tests/Unit/Query/Span/SpanContainingQueryTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace ONGR\ElasticsearchDSL\Tests\Query\Span; +namespace ONGR\ElasticsearchDSL\Tests\Unit\Query\Span; use ONGR\ElasticsearchDSL\Query\Span\SpanContainingQuery; diff --git a/tests/Query/Span/SpanFirstQueryTest.php b/tests/Unit/Query/Span/SpanFirstQueryTest.php similarity index 94% rename from tests/Query/Span/SpanFirstQueryTest.php rename to tests/Unit/Query/Span/SpanFirstQueryTest.php index 819aee94e933c886fbaa8314dbd08e5ace501e69..c8c2b907921796f306a366e778a42e44ddf38224 100644 --- a/tests/Query/Span/SpanFirstQueryTest.php +++ b/tests/Unit/Query/Span/SpanFirstQueryTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace ONGR\ElasticsearchDSL\Tests\Query\Span; +namespace ONGR\ElasticsearchDSL\Tests\Unit\Query\Span; use ONGR\ElasticsearchDSL\Query\Span\SpanFirstQuery; diff --git a/tests/Query/Span/SpanMultiTermQueryTest.php b/tests/Unit/Query/Span/SpanMultiTermQueryTest.php similarity index 94% rename from tests/Query/Span/SpanMultiTermQueryTest.php rename to tests/Unit/Query/Span/SpanMultiTermQueryTest.php index 73c69146aafe3277a4d5e5559873b030c327d3d4..fc53b0c93f379483c14953a3998ad6b675d3efdd 100644 --- a/tests/Query/Span/SpanMultiTermQueryTest.php +++ b/tests/Unit/Query/Span/SpanMultiTermQueryTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace ONGR\ElasticsearchDSL\Tests\Query\Span; +namespace ONGR\ElasticsearchDSL\Tests\Unit\Query\Span; use ONGR\ElasticsearchDSL\Query\Span\SpanMultiTermQuery; diff --git a/tests/Query/Span/SpanNearQueryTest.php b/tests/Unit/Query/Span/SpanNearQueryTest.php similarity index 95% rename from tests/Query/Span/SpanNearQueryTest.php rename to tests/Unit/Query/Span/SpanNearQueryTest.php index cbfb5e86387ec36e33234c9eb4a6650d071c30ef..020728c02716050525194935a488a401a3583bd5 100644 --- a/tests/Query/Span/SpanNearQueryTest.php +++ b/tests/Unit/Query/Span/SpanNearQueryTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace ONGR\ElasticsearchDSL\Tests\Query\Span; +namespace ONGR\ElasticsearchDSL\Tests\Unit\Query\Span; use ONGR\ElasticsearchDSL\Query\Span\SpanNearQuery; diff --git a/tests/Query/Span/SpanNotQueryTest.php b/tests/Unit/Query/Span/SpanNotQueryTest.php similarity index 95% rename from tests/Query/Span/SpanNotQueryTest.php rename to tests/Unit/Query/Span/SpanNotQueryTest.php index 2d5a8f5b57bc36851dcd4bb2836a0bc9bfd6cde4..37be01fb1712d39b9ab45fe6869e31a893b160df 100644 --- a/tests/Query/Span/SpanNotQueryTest.php +++ b/tests/Unit/Query/Span/SpanNotQueryTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace ONGR\ElasticsearchDSL\Tests\Query\Span; +namespace ONGR\ElasticsearchDSL\Tests\Unit\Query\Span; use ONGR\ElasticsearchDSL\Query\Span\SpanNotQuery; diff --git a/tests/Query/Span/SpanOrQueryTest.php b/tests/Unit/Query/Span/SpanOrQueryTest.php similarity index 95% rename from tests/Query/Span/SpanOrQueryTest.php rename to tests/Unit/Query/Span/SpanOrQueryTest.php index 10efb9b1e0a17cfea1519c5df4b42ec60784a00d..07e59739b599f99d0c2acb4d21d0aed8e0172b29 100644 --- a/tests/Query/Span/SpanOrQueryTest.php +++ b/tests/Unit/Query/Span/SpanOrQueryTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace ONGR\ElasticsearchDSL\Tests\Query\Span; +namespace ONGR\ElasticsearchDSL\Tests\Unit\Query\Span; use ONGR\ElasticsearchDSL\Query\Span\SpanOrQuery; diff --git a/tests/Query/Span/SpanTermQueryTest.php b/tests/Unit/Query/Span/SpanTermQueryTest.php similarity index 94% rename from tests/Query/Span/SpanTermQueryTest.php rename to tests/Unit/Query/Span/SpanTermQueryTest.php index 075c1221b85c340d04c3e5d14c4e3b906b70d7aa..fd6b70fcde526291da6068572f151a5aaf4c7a48 100644 --- a/tests/Query/Span/SpanTermQueryTest.php +++ b/tests/Unit/Query/Span/SpanTermQueryTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace ONGR\ElasticsearchDSL\Tests\Query\Span; +namespace ONGR\ElasticsearchDSL\Tests\Unit\Query\Span; use ONGR\ElasticsearchDSL\Query\Span\SpanTermQuery; diff --git a/tests/Query/Span/SpanWithinQueryTest.php b/tests/Unit/Query/Span/SpanWithinQueryTest.php similarity index 96% rename from tests/Query/Span/SpanWithinQueryTest.php rename to tests/Unit/Query/Span/SpanWithinQueryTest.php index 3a933c4da1a63dd923059a536767a481a8ff5386..36b7028b203e86047cf2f39c5b9846afdf5c71a3 100644 --- a/tests/Query/Span/SpanWithinQueryTest.php +++ b/tests/Unit/Query/Span/SpanWithinQueryTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace ONGR\ElasticsearchDSL\Tests\Query\Span; +namespace ONGR\ElasticsearchDSL\Tests\Unit\Query\Span; use ONGR\ElasticsearchDSL\Query\Span\SpanWithinQuery; diff --git a/tests/Query/TemplateQueryTest.php b/tests/Unit/Query/TemplateQueryTest.php similarity index 96% rename from tests/Query/TemplateQueryTest.php rename to tests/Unit/Query/TemplateQueryTest.php index 19265621bb20435820cbf7c57d525dcc24429a64..8d2a444bb8b07327ac275d9484d848dab30d9892 100644 --- a/tests/Query/TemplateQueryTest.php +++ b/tests/Unit/Query/TemplateQueryTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace ONGR\ElasticsearchDSL\Tests\Query; +namespace ONGR\ElasticsearchDSL\Tests\Unit\Query; use ONGR\ElasticsearchDSL\Query\TemplateQuery; diff --git a/tests/Query/TermQueryTest.php b/tests/Unit/Query/TermQueryTest.php similarity index 92% rename from tests/Query/TermQueryTest.php rename to tests/Unit/Query/TermQueryTest.php index 688e3dadde7727e05bddca347a018662af924f16..b6aa73b9fc70d7cb9a39243bdd539cd572fda1e2 100644 --- a/tests/Query/TermQueryTest.php +++ b/tests/Unit/Query/TermQueryTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace ONGR\ElasticsearchDSL\Tests\Query; +namespace ONGR\ElasticsearchDSL\Tests\Unit\Query; use ONGR\ElasticsearchDSL\Query\TermQuery; diff --git a/tests/Query/TermsQueryTest.php b/tests/Unit/Query/TermsQueryTest.php similarity index 93% rename from tests/Query/TermsQueryTest.php rename to tests/Unit/Query/TermsQueryTest.php index 129184747de66c3f6a83e921a5844539a4ad2abf..a3567ccd9a253d26dab2f0345bbe3eb8f87e5e2e 100644 --- a/tests/Query/TermsQueryTest.php +++ b/tests/Unit/Query/TermsQueryTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace ONGR\ElasticsearchDSL\Tests\Query; +namespace ONGR\ElasticsearchDSL\Tests\Unit\Query; use ONGR\ElasticsearchDSL\Query\TermsQuery; diff --git a/tests/Query/TypeQueryTest.php b/tests/Unit/Query/TypeQueryTest.php similarity index 92% rename from tests/Query/TypeQueryTest.php rename to tests/Unit/Query/TypeQueryTest.php index dc2bad82da182d78bb7ba85dddc1667452c95e1b..be1cf8f6d23268e75a434f46d6a9ed4ff194e6ba 100644 --- a/tests/Query/TypeQueryTest.php +++ b/tests/Unit/Query/TypeQueryTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace ONGR\ElasticsearchDSL\Tests\Query; +namespace ONGR\ElasticsearchDSL\Tests\Unit\Query; use ONGR\ElasticsearchDSL\Query\TypeQuery; diff --git a/tests/Query/WildcardQueryTest.php b/tests/Unit/Query/WildcardQueryTest.php similarity index 93% rename from tests/Query/WildcardQueryTest.php rename to tests/Unit/Query/WildcardQueryTest.php index e736df2646b3e126622295a10989a4fcd4ce99ab..cf17483f278a5fefe8e169dffefe1a37f64fa259 100644 --- a/tests/Query/WildcardQueryTest.php +++ b/tests/Unit/Query/WildcardQueryTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace ONGR\ElasticsearchDSL\Tests\Query; +namespace ONGR\ElasticsearchDSL\Tests\Unit\Query; use ONGR\ElasticsearchDSL\Query\WildcardQuery; diff --git a/tests/SearchEndpoint/AggregationsEndpointTest.php b/tests/Unit/SearchEndpoint/AggregationsEndpointTest.php similarity index 94% rename from tests/SearchEndpoint/AggregationsEndpointTest.php rename to tests/Unit/SearchEndpoint/AggregationsEndpointTest.php index 8a618dd4284fcb9d584d740e36989c0dfe5c7377..a61dba8a573529a1cdbd97909f6f266d3b158434 100644 --- a/tests/SearchEndpoint/AggregationsEndpointTest.php +++ b/tests/Unit/SearchEndpoint/AggregationsEndpointTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace ONGR\ElasticsearchDSL\Tests\Unit\SearchEndpoint; +namespace ONGR\ElasticsearchDSL\Tests\Unit\Unit\SearchEndpoint; use ONGR\ElasticsearchDSL\Aggregation\MissingAggregation; use ONGR\ElasticsearchDSL\SearchEndpoint\AggregationsEndpoint; diff --git a/tests/SearchEndpoint/FilterEndpointTest.php b/tests/Unit/SearchEndpoint/FilterEndpointTest.php similarity index 97% rename from tests/SearchEndpoint/FilterEndpointTest.php rename to tests/Unit/SearchEndpoint/FilterEndpointTest.php index 86425f6deee8f4d0635f6543893c395ef2fa8855..adfc847ade830448cefcef28c1d3cd7f6795dd90 100644 --- a/tests/SearchEndpoint/FilterEndpointTest.php +++ b/tests/Unit/SearchEndpoint/FilterEndpointTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace ONGR\ElasticsearchDSL\Tests\Unit\SearchEndpoint; +namespace ONGR\ElasticsearchDSL\Tests\Unit\Unit\SearchEndpoint; use ONGR\ElasticsearchDSL\Query\MatchAllQuery; use ONGR\ElasticsearchDSL\SearchEndpoint\FilterEndpoint; diff --git a/tests/SearchEndpoint/HighlightEndpointTest.php b/tests/Unit/SearchEndpoint/HighlightEndpointTest.php similarity index 96% rename from tests/SearchEndpoint/HighlightEndpointTest.php rename to tests/Unit/SearchEndpoint/HighlightEndpointTest.php index ff5e44f868beed2710cb14ea7d5ee2c1c50cedd1..c7058e0c0d6f84aadfe517eea9fc38b8abe474ca 100644 --- a/tests/SearchEndpoint/HighlightEndpointTest.php +++ b/tests/Unit/SearchEndpoint/HighlightEndpointTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace ONGR\ElasticsearchDSL\Tests\Unit\SearchEndpoint; +namespace ONGR\ElasticsearchDSL\Tests\Unit\Unit\SearchEndpoint; use ONGR\ElasticsearchDSL\Highlight\Highlight; use ONGR\ElasticsearchDSL\SearchEndpoint\HighlightEndpoint; diff --git a/tests/SearchEndpoint/InnerHitsEndpointTest.php b/tests/Unit/SearchEndpoint/InnerHitsEndpointTest.php similarity index 96% rename from tests/SearchEndpoint/InnerHitsEndpointTest.php rename to tests/Unit/SearchEndpoint/InnerHitsEndpointTest.php index 268bfccfce931afcb688158a84a315febc8124ef..d3d4519fd496bace1f7f7faf351347f27b0eb4e2 100644 --- a/tests/SearchEndpoint/InnerHitsEndpointTest.php +++ b/tests/Unit/SearchEndpoint/InnerHitsEndpointTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace ONGR\ElasticsearchDSL\Tests\Unit\SearchEndpoint; +namespace ONGR\ElasticsearchDSL\Tests\Unit\Unit\SearchEndpoint; use ONGR\ElasticsearchDSL\SearchEndpoint\InnerHitsEndpoint; diff --git a/tests/SearchEndpoint/PostFilterEndpointTest.php b/tests/Unit/SearchEndpoint/PostFilterEndpointTest.php similarity index 97% rename from tests/SearchEndpoint/PostFilterEndpointTest.php rename to tests/Unit/SearchEndpoint/PostFilterEndpointTest.php index 1e9ab86c55f71dea7da44264511fce0366bd31c0..0862c3795044efc9aa33464984489290064b0ae3 100644 --- a/tests/SearchEndpoint/PostFilterEndpointTest.php +++ b/tests/Unit/SearchEndpoint/PostFilterEndpointTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace ONGR\ElasticsearchDSL\Tests\Unit\SearchEndpoint; +namespace ONGR\ElasticsearchDSL\Tests\Unit\Unit\SearchEndpoint; use ONGR\ElasticsearchDSL\Query\MatchAllQuery; use ONGR\ElasticsearchDSL\SearchEndpoint\PostFilterEndpoint; diff --git a/tests/SearchEndpoint/QueryEndpointTest.php b/tests/Unit/SearchEndpoint/QueryEndpointTest.php similarity index 97% rename from tests/SearchEndpoint/QueryEndpointTest.php rename to tests/Unit/SearchEndpoint/QueryEndpointTest.php index b626caa12cff77a8adaece25ab9a0ff0947df3fe..2dd69a9f2f5efa7619c2be0c9697d91aa889ab38 100644 --- a/tests/SearchEndpoint/QueryEndpointTest.php +++ b/tests/Unit/SearchEndpoint/QueryEndpointTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace ONGR\ElasticsearchDSL\Tests\Unit\SearchEndpoint; +namespace ONGR\ElasticsearchDSL\Tests\Unit\Unit\SearchEndpoint; use ONGR\ElasticsearchDSL\Query\MatchAllQuery; use ONGR\ElasticsearchDSL\SearchEndpoint\QueryEndpoint; diff --git a/tests/SearchEndpoint/SearchEndpointFactoryTest.php b/tests/Unit/SearchEndpoint/SearchEndpointFactoryTest.php similarity index 92% rename from tests/SearchEndpoint/SearchEndpointFactoryTest.php rename to tests/Unit/SearchEndpoint/SearchEndpointFactoryTest.php index 9d134dc9d1f209f746e66ac8a00c8f6d946f5d73..7eefe32f5bf7ab10fd795f31d55305a94a220f16 100644 --- a/tests/SearchEndpoint/SearchEndpointFactoryTest.php +++ b/tests/Unit/SearchEndpoint/SearchEndpointFactoryTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace ONGR\ElasticsearchDSL\Tests\Unit\SearchEndpoint; +namespace ONGR\ElasticsearchDSL\Tests\Unit\Unit\SearchEndpoint; use ONGR\ElasticsearchDSL\SearchEndpoint\AggregationsEndpoint; use ONGR\ElasticsearchDSL\SearchEndpoint\SearchEndpointFactory; diff --git a/tests/SearchEndpoint/SortEndpointTest.php b/tests/Unit/SearchEndpoint/SortEndpointTest.php similarity index 96% rename from tests/SearchEndpoint/SortEndpointTest.php rename to tests/Unit/SearchEndpoint/SortEndpointTest.php index 5f21c9db28d6fc759635421f3249416e4f3594cb..42bc7618bc8a852cce46a33e59dd89ea38a78603 100644 --- a/tests/SearchEndpoint/SortEndpointTest.php +++ b/tests/Unit/SearchEndpoint/SortEndpointTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace ONGR\ElasticsearchDSL\Tests\Unit\SearchEndpoint; +namespace ONGR\ElasticsearchDSL\Tests\Unit\Unit\SearchEndpoint; use ONGR\ElasticsearchDSL\SearchEndpoint\SortEndpoint; use ONGR\ElasticsearchDSL\Sort\FieldSort; diff --git a/tests/SearchEndpoint/SuggestEndpointTest.php b/tests/Unit/SearchEndpoint/SuggestEndpointTest.php similarity index 96% rename from tests/SearchEndpoint/SuggestEndpointTest.php rename to tests/Unit/SearchEndpoint/SuggestEndpointTest.php index 7702a56cc8631cae93af71e554636b9e6287a1b5..e6e1cca3705a54ef9c8bcc4f0a78bb9b48ce9c20 100644 --- a/tests/SearchEndpoint/SuggestEndpointTest.php +++ b/tests/Unit/SearchEndpoint/SuggestEndpointTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace ONGR\ElasticsearchDSL\Tests\Unit\SearchEndpoint; +namespace ONGR\ElasticsearchDSL\Tests\Unit\Unit\SearchEndpoint; use ONGR\ElasticsearchDSL\SearchEndpoint\SuggestEndpoint; use ONGR\ElasticsearchDSL\Suggest\TermSuggest; diff --git a/tests/SearchTest.php b/tests/Unit/SearchTest.php similarity index 99% rename from tests/SearchTest.php rename to tests/Unit/SearchTest.php index 77d7e40830a6d251c1440270f627a20158dee411..d89949fb0f5ef8bed655d2466857c55a32a0e231 100644 --- a/tests/SearchTest.php +++ b/tests/Unit/SearchTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace ONGR\ElasticsearchDSL\Tests\Unit\DSL; +namespace ONGR\ElasticsearchDSL\Tests\Unit; use ONGR\ElasticsearchDSL\Query\MissingQuery; use ONGR\ElasticsearchDSL\Query\TermQuery; diff --git a/tests/Suggest/CompletionSuggestTest.php b/tests/Unit/Suggest/CompletionSuggestTest.php similarity index 97% rename from tests/Suggest/CompletionSuggestTest.php rename to tests/Unit/Suggest/CompletionSuggestTest.php index 8e4ce8c79daf0ae0b83f061ce004be5be4eb6083..066ae5b8adebeb6163f1927ea5d02f166e5c8a58 100644 --- a/tests/Suggest/CompletionSuggestTest.php +++ b/tests/Unit/Suggest/CompletionSuggestTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace ONGR\ElasticsearchDSL\Tests\Suggest; +namespace ONGR\ElasticsearchDSL\Tests\Unit\Suggest; use ONGR\ElasticsearchDSL\Suggest\CompletionSuggest; diff --git a/tests/Suggest/SuggestTest.php b/tests/Unit/Suggest/SuggestTest.php similarity index 98% rename from tests/Suggest/SuggestTest.php rename to tests/Unit/Suggest/SuggestTest.php index e7482239291ff61c3dba180adfae19dca8d73261..626411a08ab0e92e1c6dff8d4f226c334334cfdf 100644 --- a/tests/Suggest/SuggestTest.php +++ b/tests/Unit/Suggest/SuggestTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace ONGR\ElasticsearchDSL\Tests\Suggest; +namespace ONGR\ElasticsearchDSL\Tests\Unit\Suggest; use ONGR\ElasticsearchDSL\Suggest\Suggest; diff --git a/tests/Suggest/TermSuggestTest.php b/tests/Unit/Suggest/TermSuggestTest.php similarity index 96% rename from tests/Suggest/TermSuggestTest.php rename to tests/Unit/Suggest/TermSuggestTest.php index e3685e72e32297a6a50a8f387ab1e6caaa210ca4..6492937d52d9c2172bc803be13570a0958e6183b 100644 --- a/tests/Suggest/TermSuggestTest.php +++ b/tests/Unit/Suggest/TermSuggestTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace ONGR\ElasticsearchDSL\Tests\Suggest; +namespace ONGR\ElasticsearchDSL\Tests\Unit\Suggest; use ONGR\ElasticsearchDSL\Suggest\TermSuggest;