File tree Expand file tree Collapse file tree 4 files changed +11
-4
lines changed
tests/Elasticsearch/Tests Expand file tree Collapse file tree 4 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -637,7 +637,9 @@ public function build(): Client
637
637
if (! isset ($ this ->connectionParams ['client ' ]['headers ' ])) {
638
638
$ this ->connectionParams ['client ' ]['headers ' ] = [];
639
639
}
640
- $ apiVersioning = getenv ('ELASTIC_CLIENT_APIVERSIONING ' );
640
+ $ apiVersioning = $ _SERVER ['ELASTIC_CLIENT_APIVERSIONING ' ]
641
+ ?? $ _ENV ['ELASTIC_CLIENT_APIVERSIONING ' ]
642
+ ?? getenv ('ELASTIC_CLIENT_APIVERSIONING ' );
641
643
if (! isset ($ this ->connectionParams ['client ' ]['headers ' ]['Content-Type ' ])) {
642
644
if ($ apiVersioning === 'true ' || $ apiVersioning === '1 ' ) {
643
645
$ this ->connectionParams ['client ' ]['headers ' ]['Content-Type ' ] = ['application/vnd.elasticsearch+json;compatible-with=7 ' ];
Original file line number Diff line number Diff line change @@ -59,7 +59,10 @@ private function getClient(): Client
59
59
->setHosts ([$ this ->host ])
60
60
->setLogger ($ this ->logger );
61
61
62
- if (getenv ('TEST_SUITE ' ) === 'platinum ' ) {
62
+ $ testSuite = $ _SERVER ['TEST_SUITE ' ]
63
+ ?? $ _ENV ['TEST_SUITE ' ]
64
+ ?? getenv ('TEST_SUITE ' );
65
+ if ($ testSuite === 'platinum ' ) {
63
66
$ client ->setSSLVerification (false );
64
67
}
65
68
return $ client ->build ();
Original file line number Diff line number Diff line change @@ -60,7 +60,9 @@ class Utility
60
60
*/
61
61
public static function getHost (): ?string
62
62
{
63
- $ url = getenv ('ELASTICSEARCH_URL ' );
63
+ $ url = $ _SERVER ['ELASTICSEARCH_URL ' ]
64
+ ?? $ _ENV ['ELASTICSEARCH_URL ' ]
65
+ ?? getenv ('ELASTICSEARCH_URL ' );
64
66
if (false !== $ url ) {
65
67
return $ url ;
66
68
}
Original file line number Diff line number Diff line change 43
43
exit (1 );
44
44
}
45
45
46
- $ stack = getenv ( 'TEST_SUITE ' ) ;
46
+ $ stack = $ _SERVER [ 'TEST_SUITE ' ] ?? $ _ENV [ ' TEST_SUITE ' ] ;
47
47
printf ("***************************************** \n" );
48
48
printf ("** Bulding YAML tests for %s suite \n" , strtoupper ($ stack ));
49
49
printf ("***************************************** \n" );
You can’t perform that action at this time.
0 commit comments