public function testViewGeneratesCorrectLookingYAMLWhenCustomPhpVersionsUsed()
 {
     $view = new TravisYmlView();
     $view->setGenerationMode('plugin');
     $view->setPlugin('ExamplePlugin');
     $view->setPhpVersions(array('5.4', '5.6', 'hhvm'));
     $view->setLatestStableVersion('2.14.0');
     $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']);
 }
Beispiel #2
0
 /**
  * Generates the contents of a .travis.yml file and returns them.
  *
  * @return string
  */
 public function generate()
 {
     $this->configureView();
     return $this->view->render();
 }