// in order to ensure that Packagist is disabled during the
// `composer create-project` command.
$this->
executeCommand("COMPOSER_HOME=
$composer_home composer config --no-interaction --global repo.packagist false"
);
$this->
assertCommandSuccessful();
// Create a "Composer"-type repository containing one entry for every
// package in the vendor directory.
$vendor_packages_path =
$this->
getWorkspaceDirectory() . '/vendor_packages/packages.json';
$this->
makeVendorPackage($vendor_packages_path);
// Make a copy of the code to alter in the workspace directory.
$this->
copyCodebase();
// Tests are typically run on "-dev" versions, but we want to simulate
// running them on a tagged release at the same stability as specified in
// static::MINIMUM_STABILITY, in order to verify that everything will work
// if/when we make such a release.
$simulated_core_version = \Drupal::VERSION;
$simulated_core_version_suffix =
(static::MINIMUM_STABILITY === 'stable' ? '' : '-' .
static::MINIMUM_STABILITY . '99'
);
$simulated_core_version =
str_replace('-dev',
$simulated_core_version_suffix,
$simulated_core_version);
Composer::
setDrupalVersion($this->
getWorkspaceDirectory(),
$simulated_core_version);
$this->
assertDrupalVersion($simulated_core_version,
$this->
getWorkspaceDirectory());