function Drush_CommandTestCase::drush_major_version

6.x drush_testcase.inc Drush_CommandTestCase::drush_major_version()
5.x drush_testcase.inc Drush_CommandTestCase::drush_major_version()
1 call to Drush_CommandTestCase::drush_major_version()
contextCase::ConfigVersionSpecific in tests/contextTest.php
Assure that matching version-specific config files are loaded and others are ignored.

File

tests/drush_testcase.inc, line 402

Class

Drush_CommandTestCase

Code

function drush_major_version() {
  static $major;

  if (!isset($major)) {
    $this->drush('version', array('drush_version'), array('pipe' => NULL));
    $version = $this->getOutput();
    list($major) = explode('.', $version);
  }
  return $major;
}