You are here

protected function CakePHPInstallerTest::setCakephpVersion in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/composer/installers/tests/Composer/Installers/Test/CakePHPInstallerTest.php \Composer\Installers\Test\CakePHPInstallerTest::setCakephpVersion()
1 call to CakePHPInstallerTest::setCakephpVersion()
CakePHPInstallerTest::testGetLocations in vendor/composer/installers/tests/Composer/Installers/Test/CakePHPInstallerTest.php
Test getLocations returning appropriate values based on CakePHP version

File

vendor/composer/installers/tests/Composer/Installers/Test/CakePHPInstallerTest.php, line 106

Class

CakePHPInstallerTest

Namespace

Composer\Installers\Test

Code

protected function setCakephpVersion($rm, $version) {
  $parser = new VersionParser();
  list(, $version) = explode(' ', $parser
    ->parseConstraints($version));
  $installed = new InstalledArrayRepository();
  $package = new Package('cakephp/cakephp', $version, $version);
  $installed
    ->addPackage($package);
  $rm
    ->setLocalRepository($installed);
}