TestSuite suite = new TestSuite("Find Use Statement By Namespace Tests");
for (final PHPVersion phpVersion : TESTS.keySet()) {
TestSuite phpVerSuite = new TestSuite(phpVersion.getAlias());
final AbstractPHPSourceParser parser = PHPSourceParserFactory
.createParser(phpVersion);
for (String testsDirectory : TESTS.get(phpVersion)) {
for (final String fileName : getPDTTFiles(testsDirectory)) {
try {
final PdttFile pdttFile = new PdttFile(fileName);
phpVerSuite.addTest(new CompilerParserTests(phpVersion
.getAlias() + " - /" + fileName) {
protected void runTest() throws Throwable {
ByteArrayInputStream inputStream = new ByteArrayInputStream(
pdttFile.getFile().trim().getBytes());
ModuleDeclaration moduleDeclaration = (ModuleDeclaration) parser
.parse(new InputStreamReader(
inputStream),
null,
ProjectOptions
.useShortTags((IProject) null));