Skip to content

Commit

Permalink
Revert "[TEST] fix object notation"
Browse files Browse the repository at this point in the history
This reverts commit 518482a.
  • Loading branch information
polyfractal committed Mar 9, 2016
1 parent 6638216 commit b966328
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions tests/Elasticsearch/Tests/YamlRunnerTest.php
Expand Up @@ -404,7 +404,7 @@ private function executeTestCase($test, $testFile, $future)
reset($test);
$key = key($test);

foreach ($test->$key as $operators) {
foreach ($test[$key] as $operators) {
foreach ($operators as $operator => $settings) {
echo " > $operator: ";
ob_flush();
Expand Down Expand Up @@ -530,8 +530,8 @@ private function executeTestCase($test, $testFile, $future)
$this->assertGreaterThan($expectedCount, $this->getNestedVar($response, key($settings)));
echo "\n";
} elseif ($operator === "skip") {
if (isset($settings->version) === true) {
$version = $settings->version;
if (isset($settings['version']) === true) {
$version = $settings['version'];
$version = str_replace(" ", "", $version);
$version = explode("-", $version);

Expand All @@ -551,16 +551,16 @@ private function executeTestCase($test, $testFile, $future)
}
if (version_compare(YamlRunnerTest::$esVersion, $version[0]) >= 0
&& version_compare($version[1], YamlRunnerTest::$esVersion) >= 0) {
echo "Skipping: ".$settings->reason."\n";
echo "Skipping: ".$settings['reason']."\n";

if ($key == 'setup') {
throw new SetupSkipException();
}

return;
}
} elseif (isset($settings->features) === true) {
$feature = $settings->features;
} elseif (isset($settings['features']) === true) {
$feature = $settings['features'];
$whitelist = array();

if (array_search($feature, $whitelist) === false) {
Expand Down
2 changes: 1 addition & 1 deletion util/elasticsearch

0 comments on commit b966328

Please sign in to comment.