Further Drupal 8.6.4 changes. Some core files were not committed before a commit...
[yaffs-website] / vendor / drush / drush / isolation / tests / EnvironmentTest.php
1 <?php
2 namespace Drush\Config;
3
4 use PHPUnit\Framework\TestCase;
5
6 /**
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.
9  */
10 class EnvironmentTest extends TestCase
11 {
12     use \Drush\FixtureFactory;
13
14     function testExportConfigData()
15     {
16         $data = $this->environment()->exportConfigData();
17         $this->assertEquals($this->homeDir(), $data['env']['cwd']);
18     }
19
20     function testDocsPath()
21     {
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');
25     }
26
27     function testDrushConfigFileFixturesExist()
28     {
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');
32     }
33 }