public function drushScriptCase::testPhpOptionsTest

8.0.x drushScriptTest.php public drushScriptCase::testPhpOptionsTest()
6.x drushScriptTest.php public drushScriptCase::testPhpOptionsTest()
7.x drushScriptTest.php public drushScriptCase::testPhpOptionsTest()
5.x drushScriptTest.php public drushScriptCase::testPhpOptionsTest()
master drushScriptTest.php public drushScriptCase::testPhpOptionsTest()

Test `PHP_OPTIONS=... drush`

File

tests/drushScriptTest.php, line 14

Namespace

Unish

Class

drushScriptCase
Tests for the 'drush' script itself

Code

public function testPhpOptionsTest() {
  $this->markTestSkipped('Environment variables not yet passed along to Process by execute().');


  // @todo: could probably run this test on mingw
  if ($this->is_windows()) {
    $this->markTestSkipped('Environment variable tests not currently functional on Windows.');
  }

  $options = array();
  $env = array('PHP_OPTIONS' => '-d default_mimetype="text/drush"');
  $this->drush('ev', array('print ini_get("default_mimetype");'), $options, NULL, NULL, self::EXIT_SUCCESS, NULL, $env);
  $output = $this->getOutput();
  $this->assertEquals('text/drush', $output);
}