TestSetup setup = new TestSetup(suite) {
protected void setUp() throws Exception {
deleteProject(map.get(PROJECT).toString());
IProject project = getProject(map.get(PROJECT).toString());
IScriptProject scriptProject = DLTKCore.create(project);
project.create(null);
project.open(null);
// configure nature
IProjectDescription desc = project.getDescription();
desc.setNatureIds(new String[] { PHPNature.ID });
project.setDescription(desc, null);
ProjectOptions.setPhpVersion((PHPVersion) map.get(PHP_VERSION),
project.getProject());
IFolder testFolder = project.getFolder("pdttest");
testFolder.create(true, true, null);
if (map.get(CHANGE_INCLUDE_PATH) != null
&& ((Boolean) map.get(CHANGE_INCLUDE_PATH))
.booleanValue()) {
String[] includePath = (String[]) map.get(INCLUDE_PATH);
IBuildpathEntry[] buildpathEntries = new IBuildpathEntry[includePath.length + 1];
buildpathEntries[buildpathEntries.length - 1] = DLTKCore
.newSourceEntry(testFolder.getFullPath());
for (int i = 0; i < includePath.length; i++) {
buildpathEntries[i] = DLTKCore.newSourceEntry(project
.getFullPath().append(includePath[i]));
}
scriptProject.setRawBuildpath(buildpathEntries, null);
}
// Util.downloadAndExtract(map.get(URL).toString(),
// scriptProject
// .getProject().getLocation().toString());