public function testViewGeneratesCorrectLookingYAMLForCore() { $view = new TravisYmlView(); // no setPlugin call here signifies generating for core $view->processExistingTravisYml(PIWIK_INCLUDE_PATH . '/.travis.yml'); $view->setExtraGlobalEnvVars(array('secure: artifactspass', 'secure: githubtoken')); $view->setGenerateYmlCommand('./console generate:travis-yml \'arg1\' arg2'); $output = $view->render(); $yaml = Spyc::YAMLLoadString($output); $this->assertNotEmpty($yaml['env']); $this->assertNotEmpty($yaml['env']['global']); $this->assertBuildSectionsNotEmpty($yaml); $this->assertViewDoesNotUsePluginSpecifiedTravisCommands($yaml); }