http://www.eclipse.org/legal/cpl-v10.html
**********************************************************************/
-import net.sourceforge.phpdt.internal.compiler.parser.Parser;
-import net.sourceforge.phpdt.internal.compiler.parser.Scanner;
+import junit.framework.*;
+import net.sourceforge.phpdt.internal.compiler.parser.*;
-import org.eclipse.core.runtime.CoreException;
-import junit.framework.TestCase;
+import org.eclipse.core.runtime.*;
/**
* Tests the php parser
* Test the PHP Parser with different PHP snippets
*/
public void testPHPParser() {
+ // checkPHP("if(!$result = mysql_query($sql)) return(array());");
+ checkPHP("class test { function &fetchRow($result, $fetchmode = DB_FETCHMODE_DEFAULT, $rownum=null) \n{ \n } \n }");
+
// Bugs item #690938
checkPHP(
"$ebus_sql['sel_url_list'] = <<<EOS\n"
checkPHP("print (\"Test me\");");
checkPHP("$s = <<<HEREDOC \n dskjfhskj\n \n\nHEREDOC;");
checkPHP("$a == 0 ? print \"true\" : print \"false\";");
- checkPHP("if(!$result = mysql_query($sql)) return(array());");
- checkPHP("class test { function &fetchRow($result, $fetchmode = DB_FETCHMODE_DEFAULT, $rownum=null) \n{ \n } \n }");
checkPHP("call_user_method_array($function_name[1], ${$objectname}, $arguments);");
checkPHP("@$connect_function($dbhost, $user, $pw);");
checkPHP("$conn = @$connect_function($dbhost, $user, $pw);");