X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=vendor%2Fdrush%2Fdrush%2Fisolation%2Fsrc%2FFixtureFactory.php;fp=vendor%2Fdrush%2Fdrush%2Fisolation%2Fsrc%2FFixtureFactory.php;h=a1b2f5819f9b5e22a8a08c4cbc9859e661cfc97f;hp=0000000000000000000000000000000000000000;hb=af6d1fb995500ae68849458ee10d66abbdcfb252;hpb=680c79a86e3ed402f263faeac92e89fb6d9edcc0 diff --git a/vendor/drush/drush/isolation/src/FixtureFactory.php b/vendor/drush/drush/isolation/src/FixtureFactory.php new file mode 100644 index 000000000..a1b2f5819 --- /dev/null +++ b/vendor/drush/drush/isolation/src/FixtureFactory.php @@ -0,0 +1,41 @@ +fixturesDir() . '/home'; + } + + // It is still an aspirational goal to add Drupal 7 support back to Drush. :P + // For now, only Drupal 8 is supported. + protected function siteDir($majorVersion = '8') + { + return $this->fixturesDir() . '/sites/d' . $majorVersion; + } + + protected function environment($cwd = false) + { + $fixturesDir = $this->fixturesDir(); + $home = $this->homeDir(); + if (!$cwd) { + $cwd = $home; + } + $autoloadFile = dirname(__DIR__) . '/vendor/autoload.php'; + + $environment = new Environment($home, $cwd, $autoloadFile); + $environment + ->setEtcPrefix($fixturesDir) + ->setSharePrefix($fixturesDir . '/usr'); + + return $environment; + } +}