setUpDrupal(1, FALSE); $uri = key($sites); $root = $this->webroot(); $drupal_version = UNISH_DRUPAL_MAJOR_VERSION; // Common options for below commands. $options = array( 'root' => $root, 'uri' => $uri, 'format' => 'yaml', ); // Tests for core versions. $is_core = 1; $version = ''; $expected = <<drush('php-eval', array("return pm_parse_version('${version}', ${is_core})"), $options); $this->assertEquals($expected, $this->getOutput(), 'Core version not provided. Pick version of the bootstrapped site.'); $version = '5'; $expected = <<drush('php-eval', array("return pm_parse_version('${version}', ${is_core})"), $options); $this->assertEquals($expected, $this->getOutput(), 'Core version provided.'); // Tests for non-core versions. $is_core = 0; $version = ''; $expected = <<drush('php-eval', array("return pm_parse_version('${version}', ${is_core})"), $options); $this->assertEquals($expected, $this->getOutput(), 'Project version not provided. Pick version of the bootstrapped site.'); $version = '1.0'; $expected = <<drush('php-eval', array("return pm_parse_version('${version}')"), $options); $this->assertEquals($expected, $this->getOutput()); $version = '1.x'; $expected = <<drush('php-eval', array("return pm_parse_version('${version}')"), $options); $this->assertEquals($expected, $this->getOutput()); } }