Skip to content

Commit

Permalink
Allow to specify custom connection settings for functional tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Eugene Leonovich committed Feb 8, 2016
1 parent ec53cd0 commit 65e49ed
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
2 changes: 0 additions & 2 deletions Tests/Functional/ClientTest.php
Expand Up @@ -11,8 +11,6 @@

namespace FOS\ElasticaBundle\Tests\Functional;

use Symfony\Bundle\FrameworkBundle\Client;

/**
* @group functional
*/
Expand Down
10 changes: 5 additions & 5 deletions Tests/Functional/app/Basic/config.yml
Expand Up @@ -12,16 +12,16 @@ fos_elastica:
clients:
default:
connections:
- url: http://localhost:9200
- host: localhost
port: 9200
- url: http://%fos_elastica.host%:%fos_elastica.port%
- host: %fos_elastica.host%
port: %fos_elastica.port%
connectionStrategy: RoundRobin
second_server:
connections:
- url: http://localhost:9200
- url: http://%fos_elastica.host%:%fos_elastica.port%
connection_strategy: RoundRobin
third:
url: http://localhost:9200
url: http://%fos_elastica.host%:%fos_elastica.port%
indexes:
index:
index_name: foselastica_basic_test_%kernel.environment%
Expand Down
5 changes: 5 additions & 0 deletions phpunit.xml.dist
@@ -1,6 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>

<phpunit bootstrap="./vendor/autoload.php" colors="true">
<php>
<server name="SYMFONY__FOS_ELASTICA__HOST" value="localhost" />
<server name="SYMFONY__FOS_ELASTICA__PORT" value="9200" />
</php>

<testsuites>
<testsuite name="FOSElasticaBundle Test Suite">
<directory>./Tests</directory>
Expand Down

0 comments on commit 65e49ed

Please sign in to comment.