Skip to content

Commit 3e01b9e

Browse files
committed
[TEST] move integration test to dedicated test file
Related to #625
1 parent 1a20259 commit 3e01b9e

File tree

2 files changed

+32
-17
lines changed

2 files changed

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

tests/Elasticsearch/Tests/ClientTest.php

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -32,23 +32,6 @@ public function testConstructorIllegalPort()
3232
$client = Elasticsearch\ClientBuilder::create()->setHosts(['localhost:abc'])->build();
3333
}
3434

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

0 commit comments

Comments
 (0)