Skip to content

Commit

Permalink
Use autoload-dev for the test dummy app
Browse files Browse the repository at this point in the history
  • Loading branch information
dieterve committed Jan 15, 2016
1 parent 952f863 commit 0c20186
Show file tree
Hide file tree
Showing 17 changed files with 38 additions and 9 deletions.
5 changes: 5 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@
"ElasticSearcher\\": ["src"]
}
},
"autoload-dev": {
"psr-4": {
"ElasticSearcher\\Dummy\\": ["tests/dummy"]
}
},
"require": {
"elasticsearch/elasticsearch": "~1.3",
"illuminate/support": "^4.2|~5"
Expand Down
2 changes: 2 additions & 0 deletions tests/Fragments/Traits/PaginatedTraitTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

use ElasticSearcher\Dummy\Queries\PaginatedMoviesFrom2014Query;

class PaginatedTraitTest extends ElasticSearcherTestCase
{
public function testPaginating()
Expand Down
2 changes: 2 additions & 0 deletions tests/Fragments/Traits/SortableTraitTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

use ElasticSearcher\Dummy\Queries\SortedQuery;

class SortableTraitTest extends ElasticSearcherTestCase
{
public function testSettingSortingFields()
Expand Down
1 change: 1 addition & 0 deletions tests/Managers/DocumentsManagerTest.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?php

use ElasticSearcher\Managers\DocumentsManager;
use ElasticSearcher\Dummy\Indexes\MoviesIndex;

class DocumentsManagerTest extends ElasticSearcherTestCase
{
Expand Down
2 changes: 2 additions & 0 deletions tests/Managers/IndicesManagerTest.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<?php

use ElasticSearcher\Managers\IndicesManager;
use ElasticSearcher\Dummy\Indexes\AuthorsIndex;
use ElasticSearcher\Dummy\Indexes\MoviesIndex;

class IndicesManagerTest extends ElasticSearcherTestCase
{
Expand Down
1 change: 1 addition & 0 deletions tests/Parsers/FragmentParserTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
use ElasticSearcher\Parsers\FragmentParser;
use ElasticSearcher\Fragments\Filters\TermFilter;
use ElasticSearcher\Fragments\Analyzers\StandardAnalyzer;
use ElasticSearcher\Dummy\Fragments\Filters\IDFilter;

class FragmentParserTest extends ElasticSearcherTestCase
{
Expand Down
6 changes: 6 additions & 0 deletions tests/Queries/QueryTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
<?php

use ElasticSearcher\Dummy\Indexes\MoviesIndex;
use ElasticSearcher\Dummy\Queries\MoviesFrom2014Query;
use ElasticSearcher\Dummy\Queries\MoviesFromXYearQuery;
use ElasticSearcher\Dummy\Queries\MovieWithIDXQuery;
use ElasticSearcher\Dummy\Queries\CountMoviesFrom2014Query;

class QueryTest extends ElasticSearcherTestCase
{
public function setUp()
Expand Down
9 changes: 0 additions & 9 deletions tests/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,6 @@

require __DIR__.'/../vendor/autoload.php';
require __DIR__.'/ElasticSearcherTestCase.php';
require __DIR__.'/dummy/Indexes/MoviesIndex.php';
require __DIR__.'/dummy/Indexes/AuthorsIndex.php';
require __DIR__.'/dummy/Queries/MoviesFrom2014Query.php';
require __DIR__.'/dummy/Queries/MoviesFromXYearQuery.php';
require __DIR__.'/dummy/Queries/MovieWithIDXQuery.php';
require __DIR__.'/dummy/Queries/CountMoviesFrom2014Query.php';
require __DIR__.'/dummy/Queries/PaginatedMoviesFrom2014Query.php';
require __DIR__.'/dummy/Queries/SortedQuery.php';
require __DIR__.'/dummy/Fragments/Filters/IDFilter.php';

// Test host (should be inside the vagrant box).
define('ELASTICSEARCH_HOST', 'localhost:9200');
2 changes: 2 additions & 0 deletions tests/dummy/Fragments/Filters/IDFilter.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

namespace ElasticSearcher\Dummy\Fragments\Filters;

use ElasticSearcher\Abstracts\AbstractFragment;
use ElasticSearcher\Fragments\Filters\TermFilter;

Expand Down
2 changes: 2 additions & 0 deletions tests/dummy/Indexes/AuthorsIndex.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

namespace ElasticSearcher\Dummy\Indexes;

use ElasticSearcher\Abstracts\AbstractIndex;

class AuthorsIndex extends AbstractIndex
Expand Down
2 changes: 2 additions & 0 deletions tests/dummy/Indexes/MoviesIndex.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

namespace ElasticSearcher\Dummy\Indexes;

use ElasticSearcher\Abstracts\AbstractIndex;

class MoviesIndex extends AbstractIndex
Expand Down
2 changes: 2 additions & 0 deletions tests/dummy/Queries/CountMoviesFrom2014Query.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

namespace ElasticSearcher\Dummy\Queries;

use ElasticSearcher\Abstracts\AbstractQuery;
use ElasticSearcher\Fragments\Filters\TermFilter;

Expand Down
3 changes: 3 additions & 0 deletions tests/dummy/Queries/MovieWithIDXQuery.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
<?php

namespace ElasticSearcher\Dummy\Queries;

use ElasticSearcher\Abstracts\AbstractQuery;
use ElasticSearcher\Dummy\Fragments\Filters\IDFilter;

class MovieWithIDXQuery extends AbstractQuery
{
Expand Down
2 changes: 2 additions & 0 deletions tests/dummy/Queries/MoviesFrom2014Query.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

namespace ElasticSearcher\Dummy\Queries;

use ElasticSearcher\Abstracts\AbstractQuery;
use ElasticSearcher\Fragments\Filters\TermFilter;

Expand Down
2 changes: 2 additions & 0 deletions tests/dummy/Queries/MoviesFromXYearQuery.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

namespace ElasticSearcher\Dummy\Queries;

use ElasticSearcher\Abstracts\AbstractQuery;
use ElasticSearcher\Fragments\Filters\TermFilter;

Expand Down
2 changes: 2 additions & 0 deletions tests/dummy/Queries/PaginatedMoviesFrom2014Query.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

namespace ElasticSearcher\Dummy\Queries;

use ElasticSearcher\Abstracts\AbstractQuery;
use ElasticSearcher\Fragments\Traits\PaginatedTrait;

Expand Down
2 changes: 2 additions & 0 deletions tests/dummy/Queries/SortedQuery.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

namespace ElasticSearcher\Dummy\Queries;

use ElasticSearcher\Abstracts\AbstractQuery;
use ElasticSearcher\Fragments\Traits\SortableTrait;

Expand Down

0 comments on commit 0c20186

Please sign in to comment.