function siteSetUnitTest::testSiteSet

8.0.x siteSetUnitTest.php siteSetUnitTest::testSiteSet()
6.x siteSetUnitTest.php siteSetUnitTest::testSiteSet()
7.x siteSetUnitTest.php siteSetUnitTest::testSiteSet()
5.x siteSetUnitTest.php siteSetUnitTest::testSiteSet()
master siteSetUnitTest.php siteSetUnitTest::testSiteSet()

File

tests/siteSetUnitTest.php, line 10

Namespace

Unish

Class

siteSetUnitTest
@group base

Code

function testSiteSet() {
  if ($this->is_windows()) {
    $this->markTestSkipped('Site-set not currently available on Windows.');
  }

  $tmp_path = UNISH_TMP;
  putenv("TMPDIR=$tmp_path");
  $posix_pid = posix_getppid();
  $username = drush_get_username();

  $expected_file = UNISH_TMP . '/drush-env-' . $username . '/drush-drupal-site-' . $posix_pid;
  $filename = drush_sitealias_get_envar_filename();

  $this->assertEquals($expected_file, $filename);
}