Mercurial > hg > isophonics-drupal-site
diff core/tests/Drupal/Tests/ComposerIntegrationTest.php @ 18:af1871eacc83
Update to Drupal core 8.7.1
author | Chris Cannam |
---|---|
date | Thu, 09 May 2019 15:33:08 +0100 |
parents | 1fec387a4317 |
children |
line wrap: on
line diff
--- a/core/tests/Drupal/Tests/ComposerIntegrationTest.php Thu Feb 28 13:21:36 2019 +0000 +++ b/core/tests/Drupal/Tests/ComposerIntegrationTest.php Thu May 09 15:33:08 2019 +0100 @@ -2,8 +2,6 @@ namespace Drupal\Tests; -use Composer\Semver\Semver; - /** * Tests Composer integration. * @@ -12,15 +10,6 @@ class ComposerIntegrationTest extends UnitTestCase { /** - * The minimum PHP version supported by Drupal. - * - * @see https://www.drupal.org/docs/8/system-requirements/web-server - * - * @todo Remove as part of https://www.drupal.org/node/2908079 - */ - const MIN_PHP_VERSION = '5.5.9'; - - /** * Gets human-readable JSON error messages. * * @return string[] @@ -77,6 +66,7 @@ $this->root . '/core/lib/Drupal/Component/Transliteration', $this->root . '/core/lib/Drupal/Component/Utility', $this->root . '/core/lib/Drupal/Component/Uuid', + $this->root . '/core/lib/Drupal/Component/Version', ]; } @@ -182,34 +172,6 @@ } } - /** - * Tests package requirements for the minimum supported PHP version by Drupal. - * - * @todo This can be removed when DrupalCI supports dependency regression - * testing in https://www.drupal.org/node/2874198 - */ - public function testMinPHPVersion() { - // Check for lockfile in the application root. If the lockfile does not - // exist, then skip this test. - $lockfile = $this->root . '/composer.lock'; - if (!file_exists($lockfile)) { - $this->markTestSkipped('/composer.lock is not available.'); - } - - $lock = json_decode(file_get_contents($lockfile), TRUE); - - // Check the PHP version for each installed non-development package. The - // testing infrastructure uses the uses the development packages, and may - // update them for particular environment configurations. In particular, - // PHP 7.2+ require an updated version of phpunit, which is incompatible - // with Drupal's minimum PHP requirement. - foreach ($lock['packages'] as $package) { - if (isset($package['require']['php'])) { - $this->assertTrue(Semver::satisfies(static::MIN_PHP_VERSION, $package['require']['php']), $package['name'] . ' has a PHP dependency requirement of "' . $package['require']['php'] . '"'); - } - } - } - // @codingStandardsIgnoreStart /** * The following method is copied from \Composer\Package\Locker.