function CommandUnishTestCase::drush_major_version

8.0.x CommandUnishTestCase.php CommandUnishTestCase::drush_major_version()
7.x CommandUnishTestCase.php CommandUnishTestCase::drush_major_version()
master CommandUnishTestCase.php CommandUnishTestCase::drush_major_version()
1 call to CommandUnishTestCase::drush_major_version()
contextCase::testConfigVersionSpecific in tests/contextTest.php
Assure that matching version-specific config files are loaded and others are ignored.

File

tests/Unish/CommandUnishTestCase.php, line 397

Namespace

Unish

Class

CommandUnishTestCase

Code

function drush_major_version() {
  static $major;

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