-
Notifications
You must be signed in to change notification settings - Fork 974
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated the test generator + added allowed-warnings feature
- Loading branch information
Showing
8 changed files
with
572 additions
and
62 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// check for allowed_warnings | ||
$headers = $this->client->transport->getLastConnection()->getLastRequestInfo()['response']['headers']; | ||
if (isset($headers['Warning'])) { | ||
$expectedHeaders = :expected; | ||
$contains = false; | ||
foreach ($expectedHeaders as $expected) { | ||
$contains = $contains || (false !== strpos($headers['Warning'][0], $expected)); | ||
} | ||
$this->assertTrue($contains); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<?php | ||
/** | ||
* Elasticsearch PHP client | ||
* | ||
* @link https://github.com/elastic/elasticsearch-php/ | ||
* @copyright Copyright (c) Elasticsearch B.V (https://www.elastic.co) | ||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0 | ||
* @license https://www.gnu.org/licenses/lgpl-2.1.html GNU Lesser General Public License, Version 2.1 | ||
* | ||
* Licensed to Elasticsearch B.V under one or more agreements. | ||
* Elasticsearch B.V licenses this file to you under the Apache 2.0 License or | ||
* the GNU Lesser General Public License, Version 2.1, at your option. | ||
* See the LICENSE file in the project root for more information. | ||
*/ | ||
declare(strict_types = 1); | ||
|
||
namespace :namespace; | ||
|
||
use PHPUnit\Framework\TestCase; | ||
use Elasticsearch\Tests\Utility; | ||
use stdClass; | ||
|
||
/** | ||
* YAML test for Elasticsearch | ||
* @see :yamlfile | ||
* @group :group | ||
* | ||
* NOTE: This file is autogenerated using util/build_tests.php. Please, don't change it manually. | ||
*/ | ||
class :test-name extends TestCase | ||
{ | ||
:tests | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters