From 76e0e76981e042a8d625a7a6bafd2cf9cc63dc52 Mon Sep 17 00:00:00 2001 From: kpouer Date: Mon, 18 Aug 2003 17:43:51 +0000 Subject: [PATCH] some tests added --- .../src/test/PHPParserTestCase2.java | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/net.sourceforge.phpeclipse.tests/src/test/PHPParserTestCase2.java b/net.sourceforge.phpeclipse.tests/src/test/PHPParserTestCase2.java index 538248b..971e90e 100644 --- a/net.sourceforge.phpeclipse.tests/src/test/PHPParserTestCase2.java +++ b/net.sourceforge.phpeclipse.tests/src/test/PHPParserTestCase2.java @@ -15,6 +15,7 @@ import java.io.File; import java.io.FileNotFoundException; import net.sourceforge.phpdt.internal.corext.Assert; +import net.sourceforge.phpeclipse.PHPeclipsePlugin; /** @@ -40,6 +41,7 @@ public class PHPParserTestCase2 extends TestCase { * Test the PHP Parser with different PHP snippets */ public void testPHPParser() { + checkHTML("$a;", true); checkPHP("for ($this->i = 0;$this->i<2;$this->i++) {}", true); @@ -90,7 +92,7 @@ public class PHPParserTestCase2 extends TestCase { 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); @@ -243,9 +245,11 @@ public class PHPParserTestCase2 extends TestCase { } /** - * 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(); } -- 1.7.1