<?php require_once dirname(__FILE__) . '/../../../bootstrap/unit.php'; $t = new lime_test(1); $t->comment('nbStreamOutput - Test write'); ob_start(); $output = new nbConsoleOutput(); $output->write('test'); $text = ob_get_contents(); ob_end_clean(); $t->is($text, 'test', '->write() has written "test"');
} else { if (file_exists('./' . nbConfig::get('nb_project_config'))) { $projectConfigurationFile = './' . nbConfig::get('nb_project_config'); } else { if (file_exists(nbConfig::get('nb_bee_dir') . '/' . nbConfig::get('nb_project_config'))) { $projectConfigurationFile = nbConfig::get('nb_bee_dir') . '/' . nbConfig::get('nb_project_config'); } } } $yaml->parseFile($projectConfigurationFile, '', true); /* * ********************* */ sfServiceContainerAutoloader::register(); $serviceContainer = new sfServiceContainerBuilder(); $serviceContainer->register('pluginLoader', 'nbPluginLoader')->addArgument(nbConfig::get('nb_plugins_dir'))->addArgument(new sfServiceReference('commandLoader'))->setShared(true); $serviceContainer->register('commandLoader', 'nbCommandLoader')->setShared(true); $output = new nbConsoleOutput(); $output->setFormatter(nbConfig::get('nb_output_color', 'false') == 'true' ? new nbAnsiColorFormatter() : new nbFormatter()); $logger = nbLogger::getInstance(); $logger->setOutput($output); /* * ********************* */ if (nbConfig::has('project_bee_plugins_dir')) { $serviceContainer->pluginLoader->addDir(nbConfig::get('project_bee_plugins_dir')); } // Loads default plugins from path/to/bee/config/config.yml if (!($defaultPlugins = nbConfig::get('nb_default_plugins'))) { $defaultPlugins = array(); } else { $serviceContainer->pluginLoader->loadPlugins($defaultPlugins); } //loads project plugins from project/path/bee.yml if (nbConfig::has('project_bee_enabled_plugins')) {