2 namespace Drush\Config;
4 use PHPUnit\Framework\TestCase;
7 * The code tested here is pretty trivial; this test suite also serves
8 * the dual purpose of testing that the fixture data is reasonable.
10 class EnvironmentTest extends TestCase
12 use \Drush\FixtureFactory;
14 function testExportConfigData()
16 $data = $this->environment()->exportConfigData();
17 $this->assertEquals($this->homeDir(), $data['env']['cwd']);
20 function testDocsPath()
22 $docsPath = $this->environment()->docsPath();
23 $this->assertInternalType('string', $docsPath, 'A docsPath was found');
24 $this->assertFileExists("$docsPath/README.md", 'README.md exists at docsPath');
27 function testDrushConfigFileFixturesExist()
29 $fixturesDir = $this->fixturesDir();
30 $this->assertFileExists("$fixturesDir/etc/drush/drush.yml", '/etc/drush/drush.yml exists');
31 $this->assertFileExists("$fixturesDir/home/.drush/drush.yml", '/home/.drush/drush.yml exists');