Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / vendor / drush / drush / isolation / tests / EnvironmentTest.php
diff --git a/vendor/drush/drush/isolation/tests/EnvironmentTest.php b/vendor/drush/drush/isolation/tests/EnvironmentTest.php
new file mode 100644 (file)
index 0000000..7056927
--- /dev/null
@@ -0,0 +1,33 @@
+<?php
+namespace Drush\Config;
+
+use PHPUnit\Framework\TestCase;
+
+/**
+ * The code tested here is pretty trivial; this test suite also serves
+ * the dual purpose of testing that the fixture data is reasonable.
+ */
+class EnvironmentTest extends TestCase
+{
+    use \Drush\FixtureFactory;
+
+    function testExportConfigData()
+    {
+        $data = $this->environment()->exportConfigData();
+        $this->assertEquals($this->homeDir(), $data['env']['cwd']);
+    }
+
+    function testDocsPath()
+    {
+        $docsPath = $this->environment()->docsPath();
+        $this->assertInternalType('string', $docsPath, 'A docsPath was found');
+        $this->assertFileExists("$docsPath/README.md", 'README.md exists at docsPath');
+    }
+
+    function testDrushConfigFileFixturesExist()
+    {
+        $fixturesDir = $this->fixturesDir();
+        $this->assertFileExists("$fixturesDir/etc/drush/drush.yml", '/etc/drush/drush.yml exists');
+        $this->assertFileExists("$fixturesDir/home/.drush/drush.yml", '/home/.drush/drush.yml exists');
+    }
+}