1<?php 2 3declare(strict_types = 1); 4 5namespace Elasticsearch\Tests; 6 7use Elasticsearch; 8 9/** 10 * Class ClientTest 11 * 12 * @category Tests 13 * @package Elasticsearch 14 * @subpackage Tests 15 * @author Zachary Tong <zachary.tong@elasticsearch.com> 16 * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 17 * @link http://elasticsearch.org 18 */ 19class ClientIntegrationTests extends \PHPUnit\Framework\TestCase 20{ 21 public function testCustomQueryParams() 22 { 23 $client = Elasticsearch\ClientBuilder::create() 24 ->setHosts([getenv('ES_TEST_HOST')]) 25 ->build(); 26 27 $getParams = [ 28 'index' => 'test', 29 'type' => 'test', 30 'id' => 1, 31 'parent' => 'abc', 32 'custom' => ['customToken' => 'abc', 'otherToken' => 123], 33 'client' => ['ignore' => 400] 34 ]; 35 $exists = $client->exists($getParams); 36 37 $this->assertFalse((bool) $exists); 38 } 39} 40