Initial Drupal 11 with DDEV setup
This commit is contained in:
24
vendor/consolidation/site-alias/tests/src/FixtureFactory.php
vendored
Normal file
24
vendor/consolidation/site-alias/tests/src/FixtureFactory.php
vendored
Normal file
@ -0,0 +1,24 @@
|
||||
<?php
|
||||
namespace Consolidation\SiteAlias;
|
||||
|
||||
use \Drush\Config\Environment;
|
||||
|
||||
trait FixtureFactory
|
||||
{
|
||||
protected function fixturesDir()
|
||||
{
|
||||
return dirname(__DIR__) . '/fixtures';
|
||||
}
|
||||
|
||||
protected function homeDir()
|
||||
{
|
||||
return $this->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;
|
||||
}
|
||||
}
|
||||
14
vendor/consolidation/site-alias/tests/src/FunctionUtils.php
vendored
Normal file
14
vendor/consolidation/site-alias/tests/src/FunctionUtils.php
vendored
Normal file
@ -0,0 +1,14 @@
|
||||
<?php
|
||||
namespace Consolidation\SiteAlias;
|
||||
|
||||
trait FunctionUtils
|
||||
{
|
||||
protected $sut;
|
||||
|
||||
protected function callProtected($methodName, $args = [])
|
||||
{
|
||||
$r = new \ReflectionMethod($this->sut, $methodName);
|
||||
$r->setAccessible(true);
|
||||
return $r->invokeArgs($this->sut, $args);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user