本文整理汇总了Java中com.jetbrains.php.config.commandLine.PhpCommandSettings.addEnvs方法的典型用法代码示例。如果您正苦于以下问题:Java PhpCommandSettings.addEnvs方法的具体用法?Java PhpCommandSettings.addEnvs怎么用?Java PhpCommandSettings.addEnvs使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.jetbrains.php.config.commandLine.PhpCommandSettings
的用法示例。
在下文中一共展示了PhpCommandSettings.addEnvs方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createCommand
import com.jetbrains.php.config.commandLine.PhpCommandSettings; //导入方法依赖的package包/类
@NotNull
private PhpCommandSettings createCommand(Map<String, String> envParameters, List<String> arguments, boolean withDebuggerOptions) throws ExecutionException {
PhpInterpreter interpreter = PhpProjectConfigurationFacade.getInstance(getProject()).getInterpreter();
if (interpreter == null) {
throw new ExecutionException(TesterBundle.message("runConfiguration.errors.phpInterpreterNotSet"));
} else {
PhpCommandSettings command = PhpCommandSettingsBuilder.create(getProject(), interpreter, withDebuggerOptions);
command.setScript(getSettings().getTesterExecutable(), false);
command.importCommandLineSettings(getSettings().getPhpCommandLineSettings(), null);
command.addEnvs(envParameters);
// support for user setup
if (getSettings().getSetupScriptPath() != null) {
command.addEnv("INTELLIJ_NETTE_TESTER_USER_SETUP", getSettings().getSetupScriptPath());
}
TesterExecutionUtil.addCommandArguments(getProject(), command, getSettings(), arguments);
return command;
}
}
示例2: buildCommand
import com.jetbrains.php.config.commandLine.PhpCommandSettings; //导入方法依赖的package包/类
public void buildCommand(@NotNull Map<String, String> env, @NotNull PhpCommandSettings command) throws ExecutionException {
Project project = getProject();
DrupalRunConfiguration.Settings settings = this.getSettings();
DrupalDataService drupalDataService = DrupalDataService.getInstance(project);
String drupalRoot = drupalDataService.getDrupalPath();
boolean isDrupal8 = (drupalDataService.getVersion() == DrupalVersion.EIGHT);
// Discover the proper path to the run-tests.sh script.
try {
command.setScript(DrupalRunTestsExecutionUtil.getRunTestsPath(project), true);
} catch (DrupalVersionException dve) {
throw new ExecutionException(dve);
}
PhpInterpreter e = PhpProjectConfigurationFacade.getInstance(project).getInterpreter();
if (e == null || e.getPathToPhpExecutable() == null) {
throw new ExecutionException("Unable to find PHP executable");
}
command.addArgument("--php");
command.addArgument(e.getPathToPhpExecutable());
command.addArgument("--url");
command.addArgument(settings.getSimpletestUrl());
command.addArgument("--concurrency");
command.addArgument(Integer.toString(settings.getTestConcurrency()));
if (settings.hasColorOutput()) {
command.addArgument("--color");
}
if (settings.hasVerboseOutput()) {
command.addArgument("--verbose");
}
if (isDrupal8) {
if (settings.getSimpletestDb() != null) {
command.addArgument("--dburl");
command.addArgument(settings.getSimpletestDb());
}
if (settings.isUsingSqlite()) {
command.addArgument("--sqlite");
command.addArgument(settings.getSqliteDb());
}
if (settings.hasDieOnFail()) {
command.addArgument("--die-on-fail");
}
if (settings.hasRepeat()) {
command.addArgument("--repeat");
command.addArgument(Integer.toString(settings.getRepeatCount()));
}
String testTypes = settings.getTestTypes();
if (testTypes != null) {
command.addArgument("--types");
command.addArgument(testTypes);
}
}
// @todo This saves each test result individually. Can we parse this.
// command.addArgument("--xml ");
// command.addArgument("/tmp/drupal-tests");
DrupalRunTestsExecutionUtil.setTestGroup(command, settings.getTestGroup(), settings.getTestGroupExtra());
command.importCommandLineSettings(settings.getCommandLineSettings(), drupalRoot);
command.addEnvs(env);
}