Skip to content

Commit 71ccfc1

Browse files
committed
[TEST] move integration test to dedicated test file
Related to #625
1 parent c3cacd7 commit 71ccfc1

File tree

2 files changed

+34
-17
lines changed

2 files changed

+34
-17
lines changed

Diff for: tests/Elasticsearch/Tests/ClientIntegrationTests.php

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<?php
2+
3+
declare(strict_types = 1);
4+
5+
/**
6+
* Class ClientTest
7+
*
8+
* @category Tests
9+
* @package Elasticsearch
10+
* @subpackage Tests
11+
* @author Zachary Tong <[email protected]>
12+
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache2
13+
* @link http://elasticsearch.org
14+
*/
15+
class ClientIntegrationTests extends \PHPUnit_Framework_TestCase
16+
{
17+
public function testCustomQueryParams()
18+
{
19+
$params = array();
20+
21+
$client = Elasticsearch\ClientBuilder::create()->setHosts([$_SERVER['ES_TEST_HOST']])->build();
22+
23+
$getParams = array(
24+
'index' => 'test',
25+
'type' => 'test',
26+
'id' => 1,
27+
'parent' => 'abc',
28+
'custom' => array('customToken' => 'abc', 'otherToken' => 123),
29+
'client' => ['ignore' => 400]
30+
);
31+
$exists = $client->exists($getParams);
32+
}
33+
34+
}

Diff for: tests/Elasticsearch/Tests/ClientTest.php

-17
Original file line numberDiff line numberDiff line change
@@ -34,23 +34,6 @@ public function testConstructorIllegalPort()
3434
$client = Elasticsearch\ClientBuilder::create()->setHosts(['localhost:abc'])->build();
3535
}
3636

37-
public function testCustomQueryParams()
38-
{
39-
$params = [];
40-
41-
$client = Elasticsearch\ClientBuilder::create()->setHosts([$_SERVER['ES_TEST_HOST']])->build();
42-
43-
$getParams = [
44-
'index' => 'test',
45-
'type' => 'test',
46-
'id' => 1,
47-
'parent' => 'abc',
48-
'custom' => ['customToken' => 'abc', 'otherToken' => 123],
49-
'client' => ['ignore' => 400]
50-
];
51-
$exists = $client->exists($getParams);
52-
}
53-
5437
public function testFromConfig()
5538
{
5639
$params = [

0 commit comments

Comments
 (0)