Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 0.7.0

Bug #17118 PATCH NEEDED - Unit tests fail
Submitted: 2010-02-16 17:05 UTC
From: doconnor Assigned:
Status: Open Package: SQL_Parser (version CVS)
PHP Version: 5.3.1 OS:
Roadmaps: (Not assigned)    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 36 - 6 = ?

 
 [2010-02-16 17:05 UTC] doconnor (Daniel O'Connor)
Description: ------------ http://test.pear.php.net/unit-test-results/phpunit_results.txt Actual result: -------------- php -c ../php.ini -f /home/clockwerx/packages-all/SQL_Parser/tests/AllTests.php <pre>PHPUnit 3.4.10 by Sebastian Bergmann. ...................F.F...................................... 60 / 116 .................F...........F.......................... Time: 2 seconds, Memory: 11.00Mb There were 4 failures: 1) PHPUnit_Framework_TestCase_Sql_Parser::create #4 Caught exception: Parse error: Unexpected token ident: "production" on line 9 CONSTRAINT production UNIQUE(date_prod) ^ found: "production" in: /home/clockwerx/packages-all/SQL_Parser/SQL/Parser.php#318 from: #0 /home/clockwerx/packages-all/SQL_Parser/SQL/Parser.php(610): SQL_Parser->raiseError('Unexpected toke...') #1 /home/clockwerx/packages-all/SQL_Parser/SQL/Parser.php(1017): SQL_Parser->parseFieldOptions() #2 /home/clockwerx/packages-all/SQL_Parser/SQL/Parser.php(1079): SQL_Parser->parseFieldList() #3 /home/clockwerx/packages-all/SQL_Parser/SQL/Parser.php(1726): SQL_Parser->parseCreate() #4 /home/clockwerx/packages-all/SQL_Parser/SQL/Parser.php(1792): SQL_Parser->parseQuery() #5 /home/clockwerx/packages-all/SQL_Parser/tests/AllTests.php(60): SQL_Parser->parse('?CREATE TABLE f...') #6 /usr/local/lib/php/pear/PHPUnit/Framework/TestCase.php(705): PHPUnit_Framework_TestCase_Sql_Parser->runTest() #7 /usr/local/lib/php/pear/PHPUnit/Framework/TestResult.php(686): PHPUnit_Framework_TestCase->runBare() #8 /usr/local/lib/php/pear/PHPUnit/Framework/TestCase.php(652): PHPUnit_Framework_TestResult->run(Object(PHPUnit_Framework_TestCase_Sql_Parser)) #9 /usr/local/lib/php/pear/PHPUnit/Framework/TestSuite.php(770): PHPUnit_Framework_TestCase->run(Object(PHPUnit_Framework_TestResult)) #10 /usr/local/lib/php/pear/PHPUnit/Framework/TestSuite.php(745): PHPUnit_Framework_TestSuite->runTest(Object(PHPUnit_Framework_TestCase_Sql_Parser), Object(PHPUnit_Framework_TestResult)) #11 /usr/local/lib/php/pear/PHPUnit/TextUI/TestRunner.php(349): PHPUnit_Framework_TestSuite->run(Object(PHPUnit_Framework_TestResult), false, Array, Array, false) #12 /usr/local/lib/php/pear/PHPUnit/TextUI/TestRunner.php(120): PHPUnit_TextUI_TestRunner->doRun(Object(PHPUnit_Framework_TestSuite), Array) #13 /home/clockwerx/packages-all/SQL_Parser/tests/AllTests.php(14): PHPUnit_TextUI_TestRunner::run(Object(PHPUnit_Framework_TestSuite)) #14 /home/clockwerx/packages-all/SQL_Parser/tests/AllTests.php(135): SQL_Parser_AllTests::main() #15 {main} /home/clockwerx/packages-all/SQL_Parser/tests/AllTests.php:85 /home/clockwerx/packages-all/SQL_Parser/tests/AllTests.php:14 /home/clockwerx/packages-all/SQL_Parser/tests/AllTests.php:135 2) PHPUnit_Framework_TestCase_Sql_Parser::create #6 SQL seems to run fine now, please update the expected test result! /home/clockwerx/packages-all/SQL_Parser/tests/AllTests.php:82 /home/clockwerx/packages-all/SQL_Parser/tests/AllTests.php:14 /home/clockwerx/packages-all/SQL_Parser/tests/AllTests.php:135 3) PHPUnit_Framework_TestCase_Sql_Parser::select #9 SQL still fails to be parsed SQL: select a as b, min(a) as baz from foo; Expected: [array with parsed SQL] Result: Caught exception: Parse error: Expected EOQ on line 2 select a as b, min(a) as baz from foo; ^ found: "as" in: /home/clockwerx/packages-all/SQL_Parser/SQL/Parser.php#318 from: #0 /home/clockwerx/packages-all/SQL_Parser/SQL/Parser.php(1794): SQL_Parser->raiseError('Expected EOQ') #1 /home/clockwerx/packages-all/SQL_Parser/tests/AllTests.php(60): SQL_Parser->parse('?select a as b,...') #2 /usr/local/lib/php/pear/PHPUnit/Framework/TestCase.php(705): PHPUnit_Framework_TestCase_Sql_Parser->runTest() #3 /usr/local/lib/php/pear/PHPUnit/Framework/TestResult.php(686): PHPUnit_Framework_TestCase->runBare() #4 /usr/local/lib/php/pear/PHPUnit/Framework/TestCase.php(652): PHPUnit_Framework_TestResult->run(Object(PHPUnit_Framework_TestCase_Sql_Parser)) #5 /usr/local/lib/php/pear/PHPUnit/Framework/TestSuite.php(770): PHPUnit_Framework_TestCase->run(Object(PHPUnit_Framework_TestResult)) #6 /usr/local/lib/php/pear/PHPUnit/Framework/TestSuite.php(745): PHPUnit_Framework_TestSuite->runTest(Object(PHPUnit_Framework_TestCase_Sql_Parser), Object(PHPUnit_Framework_TestResult)) #7 /usr/local/lib/php/pear/PHPUnit/TextUI/TestRunner.php(349): PHPUnit_Framework_TestSuite->run(Object(PHPUnit_Framework_TestResult), false, Array, Array, false) #8 /usr/local/lib/php/pear/PHPUnit/TextUI/TestRunner.php(120): PHPUnit_TextUI_TestRunner->doRun(Object(PHPUnit_Framework_TestSuite), Array) #9 /home/clockwerx/packages-all/SQL_Parser/tests/AllTests.php(14): PHPUnit_TextUI_TestRunner::run(Object(PHPUnit_Framework_TestSuite)) #10 /home/clockwerx/packages-all/SQL_Parser/tests/AllTests.php(135): SQL_Parser_AllTests::main() #11 {main} ********************* /home/clockwerx/packages-all/SQL_Parser/tests/AllTests.php:78 /home/clockwerx/packages-all/SQL_Parser/tests/AllTests.php:14 /home/clockwerx/packages-all/SQL_Parser/tests/AllTests.php:135 4) PHPUnit_Framework_TestCase_Sql_Parser::select #21 SQL still fails to be parsed SQL: select a, max(b) as x, sum(c) as y, min(d) as z from e; Expected: [array with parsed SQL] Result: Caught exception: Parse error: Expected EOQ on line 2 select a, max(b) as x, sum(c) as y, min(d) as z from e; ^ found: "as" in: /home/clockwerx/packages-all/SQL_Parser/SQL/Parser.php#318 from: #0 /home/clockwerx/packages-all/SQL_Parser/SQL/Parser.php(1794): SQL_Parser->raiseError('Expected EOQ') #1 /home/clockwerx/packages-all/SQL_Parser/tests/AllTests.php(60): SQL_Parser->parse('?select a, max(...') #2 /usr/local/lib/php/pear/PHPUnit/Framework/TestCase.php(705): PHPUnit_Framework_TestCase_Sql_Parser->runTest() #3 /usr/local/lib/php/pear/PHPUnit/Framework/TestResult.php(686): PHPUnit_Framework_TestCase->runBare() #4 /usr/local/lib/php/pear/PHPUnit/Framework/TestCase.php(652): PHPUnit_Framework_TestResult->run(Object(PHPUnit_Framework_TestCase_Sql_Parser)) #5 /usr/local/lib/php/pear/PHPUnit/Framework/TestSuite.php(770): PHPUnit_Framework_TestCase->run(Object(PHPUnit_Framework_TestResult)) #6 /usr/local/lib/php/pear/PHPUnit/Framework/TestSuite.php(745): PHPUnit_Framework_TestSuite->runTest(Object(PHPUnit_Framework_TestCase_Sql_Parser), Object(PHPUnit_Framework_TestResult)) #7 /usr/local/lib/php/pear/PHPUnit/TextUI/TestRunner.php(349): PHPUnit_Framework_TestSuite->run(Object(PHPUnit_Framework_TestResult), false, Array, Array, false) #8 /usr/local/lib/php/pear/PHPUnit/TextUI/TestRunner.php(120): PHPUnit_TextUI_TestRunner->doRun(Object(PHPUnit_Framework_TestSuite), Array) #9 /home/clockwerx/packages-all/SQL_Parser/tests/AllTests.php(14): PHPUnit_TextUI_TestRunner::run(Object(PHPUnit_Framework_TestSuite)) #10 /home/clockwerx/packages-all/SQL_Parser/tests/AllTests.php(135): SQL_Parser_AllTests::main() #11 {main} ********************* /home/clockwerx/packages-all/SQL_Parser/tests/AllTests.php:78 /home/clockwerx/packages-all/SQL_Parser/tests/AllTests.php:14 /home/clockwerx/packages-all/SQL_Parser/tests/AllTests.php:135 FAILURES! Tests: 116, Assertions: 99, Failures: 4.

Comments

 [2011-02-14 10:23 UTC] alan_k (Alan Knowles)
-Summary: Unit tests fail +Summary: PATCH NEEDED - Unit tests fail