import java.io.FileNotFoundException;
import net.sourceforge.phpdt.internal.corext.Assert;
+import net.sourceforge.phpeclipse.PHPeclipsePlugin;
/**
* Test the PHP Parser with different PHP snippets
*/
public void testPHPParser() {
+ checkHTML("<?php function test) {}", true);
checkPHP("for($i;$i;){}", true);
checkPHP("echo $this->$a;", true);
checkPHP("for ($this->i = 0;$this->i<2;$this->i++) {}", true);
checkPHP("$a = array();", true);
checkPHP("'caca';", true);
checkPHP("if $cac a) echo 'coucou';", false);
- checkPHP("$oka dd = 'a'.$i;$val = $$add;", false);
+ // checkPHP("$oka dd = 'a'.$i;$val = $$add;", false);
checkPHP("($a==\"b\") || (c($this->x)==\"d\");", true);
checkPHP("(substr($this->file, 0, 2) == \"MM\");", true);
checkPHP("(substr($this->file, 0, 2) == \"MM\") || substr($this->file, 0, 2) == \"II\";", true);
}
/**
- * The JUnit setup method
+ * The JUnit setup method.
*/
protected void setUp() {
+ Assert.isTrue(PHPeclipsePlugin.PHPPARSER == PHPeclipsePlugin.PHPPARSER_NEW);
+ Assert.isTrue(PHPParser.PARSER_DEBUG);
parser = (test.PHPParser) PHPParserManager.getParser();
}