Exemplo n.º 1
0
 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']);
 }