diff options
author | diosmosis <benaka@piwik.pro> | 2015-07-19 01:35:49 +0300 |
---|---|---|
committer | diosmosis <benaka@piwik.pro> | 2015-07-19 01:35:49 +0300 |
commit | e8e616b624387527247be7c64c5c50a8179ddf8a (patch) | |
tree | e54ee2d1a63e151fc3294abf8ccc993b52a86d49 /plugins/TestRunner | |
parent | 2b0ec3f5bbcdf165321772ef2ab57703d4d3b216 (diff) |
Fixing .travis.yml generation tests.
Diffstat (limited to 'plugins/TestRunner')
3 files changed, 8 insertions, 1 deletions
diff --git a/plugins/TestRunner/TravisYml/Generator/PluginTravisYmlGenerator.php b/plugins/TestRunner/TravisYml/Generator/PluginTravisYmlGenerator.php index 4e55b5f907..39b0983900 100644 --- a/plugins/TestRunner/TravisYml/Generator/PluginTravisYmlGenerator.php +++ b/plugins/TestRunner/TravisYml/Generator/PluginTravisYmlGenerator.php @@ -63,7 +63,7 @@ class PluginTravisYmlGenerator extends Generator $this->view->setGenerationMode('plugin'); $this->view->setPlugin($this->targetPlugin); $this->view->setPathToCustomTravisStepsFiles($this->getPluginRootFolder() . "/tests/travis"); - $this->view->latestStableVersion = $this->getLatestStableVersion(); + $this->view->setLatestStable($this->getLatestStableVersion()); $testsToRun = array(); $testsToExclude = array(); diff --git a/plugins/TestRunner/TravisYml/TravisYmlView.php b/plugins/TestRunner/TravisYml/TravisYmlView.php index 9c4a6a8462..4de9fe8406 100644 --- a/plugins/TestRunner/TravisYml/TravisYmlView.php +++ b/plugins/TestRunner/TravisYml/TravisYmlView.php @@ -227,4 +227,9 @@ class TravisYmlView extends View { return "$rootPath/$sectionName.$type.yml"; } + + public function setLatestStable($version) + { + $this->latestStableVersion = $version; + } }
\ No newline at end of file diff --git a/plugins/TestRunner/tests/Integration/TravisYmlViewTest.php b/plugins/TestRunner/tests/Integration/TravisYmlViewTest.php index 89cfe74097..aa9bdc91e4 100644 --- a/plugins/TestRunner/tests/Integration/TravisYmlViewTest.php +++ b/plugins/TestRunner/tests/Integration/TravisYmlViewTest.php @@ -34,6 +34,7 @@ class TravisYmlViewTest extends PHPUnit_Framework_TestCase $view->setExtraGlobalEnvVars(array('secure: artifactspass', 'secure: githubtoken')); $view->setGenerateYmlCommand('./console generate:travis-yml \'arg1\' arg2'); $view->setPathToCustomTravisStepsFiles(PIWIK_INCLUDE_PATH . '/plugins/ExamplePlugin/tests/travis'); + $view->setLatestStable('2.14.0'); $view->setTestsToRun(array( array('name' => "PluginTests", 'vars' => "MYSQL_ADAPTER=PDO_MYSQL"), array('name' => "PluginTests", 'vars' => "MYSQL_ADAPTER=PDO_MYSQL TEST_AGAINST_CORE=latest_stable") @@ -127,6 +128,7 @@ class TravisYmlViewTest extends PHPUnit_Framework_TestCase $view->setGenerationMode('plugin'); $view->setPlugin('ExamplePlugin'); $view->setPhpVersions(array('5.4', '5.6', 'hhvm')); + $view->setLatestStable('2.14.0'); $view->setGenerateYmlCommand('./console generate:travis-yml arg1 arg2'); $output = $view->render(); |