fix PHP tests

This commit is contained in:
Vladimir Krivosheev
2014-09-04 21:07:07 +02:00
parent 08f3326b1f
commit 85b24a86f5
@@ -340,11 +340,14 @@ public abstract class StateStorageManagerImpl implements StateStorageManager, Di
expanded = StringUtil.replace(expanded, macro, myMacros.get(macro));
}
final Matcher matcher = MACRO_PATTERN.matcher(expanded);
while (matcher.find()) {
String m = matcher.group(1);
if (m != null && !myMacros.containsKey(m) && (!ApplicationManager.getApplication().isUnitTestMode() || !m.contains("\\com.jetbrains.php."))) {
throw new IllegalArgumentException("Unknown macro: " + m + " in storage file spec: " + file);
// PHP tests use $ as part of name and resulting project name will contain macros-like string
if (!ApplicationManager.getApplication().isUnitTestMode()) {
final Matcher matcher = MACRO_PATTERN.matcher(expanded);
while (matcher.find()) {
String m = matcher.group(1);
if (m != null && !myMacros.containsKey(m)) {
throw new IllegalArgumentException("Unknown macro: " + m + " in storage file spec: " + file);
}
}
}