Beispiel #1
0
 private function setExtraEnvironmentVariables()
 {
     if (!empty($this->view->existingEnv)) {
         $this->log('info', "Existing .yml file found, ignoring global variables specified on command line.");
         return;
     }
     $extraVars = array();
     $artifactsPass = @$this->options['artifacts-pass'];
     if (!empty($artifactsPass)) {
         $extraVars[] = $this->travisEncrypt("ARTIFACTS_PASS="******"GITHUB_USER_TOKEN=" . $githubToken);
     }
     $this->view->setExtraGlobalEnvVars($extraVars);
 }
Beispiel #2
0
 public function testViewGeneratesCorrectLookingYAMLWhenCustomPhpVersionsUsed()
 {
     $view = new TravisYmlView();
     $view->setGenerationMode('plugin');
     $view->setPlugin('ExamplePlugin');
     $view->setPhpVersions(array('5.4', '5.6', 'hhvm'));
     $view->setGenerateYmlCommand('./console generate:travis-yml arg1 arg2');
     $output = $view->render();
     $yaml = Spyc::YAMLLoadString($output);
     $this->assertNotEmpty($yaml['php']);
     $this->assertEquals(array('5.4', '5.6', 'hhvm'), $yaml['php']);
 }