Skip to content

Commit

Permalink
[TEST] move integration test to dedicated test file
Browse files Browse the repository at this point in the history
Related to #625
  • Loading branch information
polyfractal committed Aug 24, 2017
1 parent c3cacd7 commit 71ccfc1
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 17 deletions.
34 changes: 34 additions & 0 deletions tests/Elasticsearch/Tests/ClientIntegrationTests.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?php

declare(strict_types = 1);

/**
* Class ClientTest
*
* @category Tests
* @package Elasticsearch
* @subpackage Tests
* @author Zachary Tong <zachary.tong@elasticsearch.com>
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache2
* @link http://elasticsearch.org
*/
class ClientIntegrationTests extends \PHPUnit_Framework_TestCase
{
public function testCustomQueryParams()
{
$params = array();

$client = Elasticsearch\ClientBuilder::create()->setHosts([$_SERVER['ES_TEST_HOST']])->build();

$getParams = array(
'index' => 'test',
'type' => 'test',
'id' => 1,
'parent' => 'abc',
'custom' => array('customToken' => 'abc', 'otherToken' => 123),
'client' => ['ignore' => 400]
);
$exists = $client->exists($getParams);
}

}
17 changes: 0 additions & 17 deletions tests/Elasticsearch/Tests/ClientTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,23 +34,6 @@ public function testConstructorIllegalPort()
$client = Elasticsearch\ClientBuilder::create()->setHosts(['localhost:abc'])->build();
}

public function testCustomQueryParams()
{
$params = [];

$client = Elasticsearch\ClientBuilder::create()->setHosts([$_SERVER['ES_TEST_HOST']])->build();

$getParams = [
'index' => 'test',
'type' => 'test',
'id' => 1,
'parent' => 'abc',
'custom' => ['customToken' => 'abc', 'otherToken' => 123],
'client' => ['ignore' => 400]
];
$exists = $client->exists($getParams);
}

public function testFromConfig()
{
$params = [
Expand Down

0 comments on commit 71ccfc1

Please sign in to comment.