diff --git a/.travis.yml b/.travis.yml index a3f69227e..463dfa737 100644 --- a/.travis.yml +++ b/.travis.yml @@ -51,7 +51,7 @@ jobs: - { env: ORCA_JOB=LOOSE_DEPRECATED_CODE_SCAN, name: "Loose deprecated code scan" } - { env: ORCA_JOB=STRICT_DEPRECATED_CODE_SCAN, name: "Strict deprecated code scan" } - { env: ORCA_JOB=DEPRECATED_CODE_SCAN_W_CONTRIB, name: "Deprecated code scan w/ contrib" } - - { env: ORCA_JOB=ISOLATED_TEST_ON_NEXT_MINOR, name: "Isolated test on next minor Drupal core version" } + - { env: ORCA_JOB=ISOLATED_TEST_ON_NEXT_MINOR ORCA_ENABLE_NIGHTWATCH=TRUE, name: "Isolated test on next minor Drupal core version with Nightwatch.js" } - { env: ORCA_JOB=INTEGRATED_TEST_ON_NEXT_MINOR, name: "Integrated test on next minor Drupal core version" } - { env: ORCA_JOB=ISOLATED_TEST_ON_NEXT_MINOR_DEV, name: "Isolated test on next minor dev Drupal core version" } - { env: ORCA_JOB=INTEGRATED_TEST_ON_NEXT_MINOR_DEV, name: "Integrated test on next minor dev Drupal core version" } diff --git a/src/Domain/Fixture/FixtureCreator.php b/src/Domain/Fixture/FixtureCreator.php index 5679e4fc3..d218a1c49 100644 --- a/src/Domain/Fixture/FixtureCreator.php +++ b/src/Domain/Fixture/FixtureCreator.php @@ -259,6 +259,10 @@ private function fixDefaultDependencies(): void { $additions[] = "drupal/core-dev:{$this->options->getCore()}"; } + if ($this->shouldRequireProphecyPhpunit()) { + $additions[] = 'phpspec/prophecy-phpunit:^2'; + } + // Install requirements for deprecation checking. $additions[] = 'mglaman/phpstan-drupal-deprecations'; $additions[] = 'nette/di:^3.0'; @@ -297,6 +301,19 @@ private function shouldRequireDrupalCoreDev(): bool { return Comparator::greaterThanOrEqualTo($version, '8.8'); } + /** + * Determines whether or not to require phpspec/prophecy-phpunit. + * + * @see https://www.drupal.org/node/3176567 + * + * @return bool + * Returns TRUE if it should be required, or FALSE if not. + */ + private function shouldRequireProphecyPhpunit(): bool { + $version = $this->options->getCoreResolved(); + return Comparator::greaterThanOrEqualTo($version, '9.1'); + } + /** * Gets the list of unwanted packages. *