public function FilesystemCase::testExecuteBits

8.0.x filesystemTest.php public FilesystemCase::testExecuteBits()
6.x filesystemTest.php public FilesystemCase::testExecuteBits()
7.x filesystemTest.php public FilesystemCase::testExecuteBits()
5.x filesystemTest.php public FilesystemCase::testExecuteBits()
master filesystemTest.php public FilesystemCase::testExecuteBits()

File

tests/filesystemTest.php, line 34

Namespace

Unish

Class

FilesystemCase
Filesystem related testing.

Code

public function testExecuteBits() {
  if ($this->is_windows()) {
    $this->markTestSkipped("execute bit test doesn't apply on Windows.");
  }

  $dest = UNISH_SANDBOX . '/test-filesystem-execute';
  mkdir($dest);
  $this->execute(sprintf("git clone --depth=1 https://github.com/drush-ops/drush.git %s", $dest . '/drush'));

  $perms = fileperms($dest . '/drush/drush') & 0111;
  $this->assertEquals($perms, 0111, 'Execute permission is preserved.');
}