/** * Ignores version specified. * * @param Connection $connection */ protected function ignoreVersions(Connection $connection) { $currentVersion = $connection->getVersionNumber(); $ignore = null; foreach ($this->getIgnoredVersions() as $ignoredVersion) { if (version_compare($currentVersion, $ignoredVersion[0], $ignoredVersion[1]) === true) { $ignore = true; if (isset($ignoredVersion[2])) { if ($ignoredVersion[2] === $this->getName()) { break; } $ignore = false; } } } if ($ignore === true) { $this->markTestSkipped("Elasticsearch version {$currentVersion} not supported by this test."); } }