791 tests, with 85 warnings and 31 failures.
SQL_Parser_Test
92 tests, with 0 warnings and 29 failures.
PHPUnit_Framework_TestCase_Sql_Parser->create #5()
SQL still fails to be parsed
SQL: CREATE TABLE films (
code CHARACTER(5) CONSTRAINT firstkey PRIMARY KEY,
title CHARACTER VARYING(40) NOT NULL,
did DECIMAL(3) NOT NULL,
date_prod DATE,
kind CHAR(10),
len INTERVAL minute to hour
CONSTRAINT production UNIQUE(date_prod)
)
Expected:
[array with parsed SQL]
Result:
Parse error: hour is not smaller than minute on line 7
len INTERVAL minute to hour
^ found: "hour"
*********************
/data/pear/pear/SQL_Parser/tests/AllTests.php:87
PHPUnit_Framework_TestCase_Sql_Parser->create #9()
SQL still fails to be parsed
SQL: create table nodefinitions
Expected:
[array with parsed SQL]
Result:
Parse error: Expected ( on line 1
create table nodefinitions
^ found: "*end of input*"
*********************
/data/pear/pear/SQL_Parser/tests/AllTests.php:87
PHPUnit_Framework_TestCase_Sql_Parser->create #10()
SQL still fails to be parsed
SQL: create dogfood
Expected:
[array with parsed SQL]
Result:
Parse error: Unknown object to create on line 1
create dogfood
^ found: "dogfood"
*********************
/data/pear/pear/SQL_Parser/tests/AllTests.php:87
PHPUnit_Framework_TestCase_Sql_Parser->create #11()
SQL still fails to be parsed
SQL: create table dunce (name varchar
Expected:
[array with parsed SQL]
Result:
Parse error: Expected ) on line 1
create table dunce (name varchar
^ found: "*end of input*"
*********************
/data/pear/pear/SQL_Parser/tests/AllTests.php:87
PHPUnit_Framework_TestCase_Sql_Parser->create #12()
SQL still fails to be parsed
SQL: create table dunce (name varchar(2,3))
Expected:
[array with parsed SQL]
Result:
Parse error: Expected 1 parameter on line 1
create table dunce (name varchar(2,3))
^ found: ")"
*********************
/data/pear/pear/SQL_Parser/tests/AllTests.php:87
PHPUnit_Framework_TestCase_Sql_Parser->delete #1()
Output format has changed
SQL: delete from dog where cat = 4 and horse <> "dead meat" or mouse = 'furry'
array ( = array (
'command' => 'delete', = 'command' => 'delete',
'table_names' => = 'table_names' =>
array ( = array (
0 => 'dog', = 0 => 'dog',
), = ),
'where_clause' => = 'where_clause' =>
array ( = array (
'arg_1' => = 'arg_1' =>
array ( = array (
'arg_1' => = 'arg_1' =>
array ( = array (
'value' => 'cat', = 'value' => 'cat',
'type' => 'ident', = 'type' => 'ident',
), = ),
'op' => '=', = 'op' => '=',
'arg_2' => = 'arg_2' =>
array ( = array (
'value' => 4, = 'value' => 4,
'type' => 'int_val', = 'type' => 'int_val',
), = ),
), = ),
'op' => 'and', = 'op' => 'and',
'arg_2' => = 'arg_2' =>
array ( = array (
'arg_1' => = 'arg_1' =>
array ( = array (
'arg_1' => = 'arg_1' =>
array ( = array (
'value' => 'horse', = 'value' => 'horse',
'type' => 'ident', = 'type' => 'ident',
), = ),
'op' => '<>', = 'op' => '<>',
'arg_2' => = 'arg_2' =>
array ( = array (
'value' => 'dead meat', = 'value' => 'dead meat',
'type' => 'text_val', ! 'type' => 'ident',
), = ),
), = ),
'op' => 'or', = 'op' => 'or',
'arg_2' => = 'arg_2' =>
array ( = array (
'arg_1' => = 'arg_1' =>
array ( = array (
'value' => 'mouse', = 'value' => 'mouse',
'type' => 'ident', = 'type' => 'ident',
), = ),
'op' => '=', = 'op' => '=',
'arg_2' => = 'arg_2' =>
array ( = array (
'value' => 'furry', = 'value' => 'furry',
'type' => 'text_val', = 'type' => 'text_val',
), = ),
), = ),
), = ),
), = ),
) = )
*********************
/data/pear/pear/SQL_Parser/tests/AllTests.php:101
PHPUnit_Framework_TestCase_Sql_Parser->delete #2()
SQL still fails to be parsed
SQL: delete from
Expected:
[array with parsed SQL]
Result:
Parse error: Expected a table name on line 1
delete from
^ found: "*end of input*"
*********************
/data/pear/pear/SQL_Parser/tests/AllTests.php:87
PHPUnit_Framework_TestCase_Sql_Parser->delete #3()
SQL still fails to be parsed
SQL: delete from cat
Expected:
[array with parsed SQL]
Result:
Parse error: Expected "where" on line 1
delete from cat
^ found: "*end of input*"
*********************
/data/pear/pear/SQL_Parser/tests/AllTests.php:87
PHPUnit_Framework_TestCase_Sql_Parser->delete #4()
SQL still fails to be parsed
SQL: delete from where cat = 53
Expected:
[array with parsed SQL]
Result:
Parse error: Expected a table name on line 1
delete from where cat = 53
^ found: "where"
*********************
/data/pear/pear/SQL_Parser/tests/AllTests.php:87
PHPUnit_Framework_TestCase_Sql_Parser->delete #5()
SQL still fails to be parsed
SQL: delete from dog where mouse is happy
Expected:
[array with parsed SQL]
Result:
Parse error: Expected "null" on line 1
delete from dog where mouse is happy
^ found: "happy"
*********************
/data/pear/pear/SQL_Parser/tests/AllTests.php:87
PHPUnit_Framework_TestCase_Sql_Parser->drop #3()
SQL still fails to be parsed
SQL: drop table play cascade restrict
Expected:
[array with parsed SQL]
Result:
Parse error: Unexpected token on line 1
drop table play cascade restrict
^ found: "restrict"
*********************
/data/pear/pear/SQL_Parser/tests/AllTests.php:87
PHPUnit_Framework_TestCase_Sql_Parser->drop #4()
SQL still fails to be parsed
SQL: drop table cat where mouse = floor
Expected:
[array with parsed SQL]
Result:
Parse error: Unexpected token on line 1
drop table cat where mouse = floor
^ found: "mouse"
*********************
/data/pear/pear/SQL_Parser/tests/AllTests.php:87
PHPUnit_Framework_TestCase_Sql_Parser->drop #5()
SQL still fails to be parsed
SQL: drop elephant
Expected:
[array with parsed SQL]
Result:
Parse error: Unknown object to drop on line 1
drop elephant
^ found: "elephant"
*********************
/data/pear/pear/SQL_Parser/tests/AllTests.php:87
PHPUnit_Framework_TestCase_Sql_Parser->employment #2()
SQL still fails to be parsed
SQL:
create table departments (
id int auto_increment default 0,
title varchar(30)
)
Expected:
[array with parsed SQL]
Result:
Parse error: Unexpected token auto_increment on line 3
id int auto_increment default 0,
^ found: "auto_increment"
*********************
/data/pear/pear/SQL_Parser/tests/AllTests.php:87
PHPUnit_Framework_TestCase_Sql_Parser->insert #3()
SQL seems to run fine now, please update the expected test result!
/data/pear/pear/SQL_Parser/tests/AllTests.php:90
PHPUnit_Framework_TestCase_Sql_Parser->select #17()
Output format has changed
SQL: select count(child_table.name) from parent_table ,child_table where parent_table.id = child_table.id
array ( = array (
'command' => 'select', = 'command' => 'select',
'set_function' => = 'set_function' =>
array ( = array (
0 => = 0 =>
array ( = array (
'name' => 'count', = 'name' => 'count',
'arg' => = 'arg' =>
array ( = array (
0 => 'child_table.name', = 0 => 'child_table.name',
), = ),
'type' => = 'type' =>
array ( = array (
0 => 'ident', ! 0 => 'ident.ident',
), = ),
), = ),
), = ),
'table_names' => = 'table_names' =>
array ( = array (
0 => 'parent_table', = 0 => 'parent_table',
1 => 'child_table', = 1 => 'child_table',
), = ),
'table_aliases' => = 'table_aliases' =>
array ( = array (
0 => '', = 0 => '',
1 => '', = 1 => '',
), = ),
'table_join_clause' => = 'table_join_clause' =>
array ( = array (
0 => '', = 0 => '',
1 => '', = 1 => '',
), = ),
'table_join' => = 'table_join' =>
array ( = array (
0 => ',', = 0 => ',',
), = ),
'where_clause' => = 'where_clause' =>
array ( = array (
'arg_1' => = 'arg_1' =>
array ( = array (
'value' => 'parent_table.id', = 'value' => 'parent_table.id',
'type' => 'ident', = 'type' => 'ident',
), = ),
'op' => '=', = 'op' => '=',
'arg_2' => = 'arg_2' =>
array ( = array (
'value' => 'child_table.id', = 'value' => 'child_table.id',
'type' => 'ident', = 'type' => 'ident',
), = ),
), = ),
) = )
*********************
/data/pear/pear/SQL_Parser/tests/AllTests.php:101
PHPUnit_Framework_TestCase_Sql_Parser->select #18()
Output format has changed
SQL: select parent_table.name, count(child_table.name) from parent_table ,child_table where parent_table.id = child_table.id group by parent_table.name
array ( = array (
'command' => 'select', = 'command' => 'select',
'column_tables' => = 'column_tables' =>
array ( = array (
0 => 'parent_table', = 0 => 'parent_table',
), = ),
'column_names' => = 'column_names' =>
array ( = array (
0 => 'name', = 0 => 'name',
), = ),
'column_aliases' => = 'column_aliases' =>
array ( = array (
0 => '', = 0 => '',
), = ),
'set_function' => = 'set_function' =>
array ( = array (
0 => = 0 =>
array ( = array (
'name' => 'count', = 'name' => 'count',
'arg' => = 'arg' =>
array ( = array (
0 => 'child_table.name', = 0 => 'child_table.name',
), = ),
'type' => = 'type' =>
array ( = array (
0 => 'ident', ! 0 => 'ident.ident',
), = ),
), = ),
), = ),
'table_names' => = 'table_names' =>
array ( = array (
0 => 'parent_table', = 0 => 'parent_table',
1 => 'child_table', = 1 => 'child_table',
), = ),
'table_aliases' => = 'table_aliases' =>
array ( = array (
0 => '', = 0 => '',
1 => '', = 1 => '',
), = ),
'table_join_clause' => = 'table_join_clause' =>
array ( = array (
0 => '', = 0 => '',
1 => '', = 1 => '',
), = ),
'table_join' => = 'table_join' =>
array ( = array (
0 => ',', = 0 => ',',
), = ),
'where_clause' => = 'where_clause' =>
array ( = array (
'arg_1' => = 'arg_1' =>
array ( = array (
'value' => 'parent_table.id', = 'value' => 'parent_table.id',
'type' => 'ident', = 'type' => 'ident',
), = ),
'op' => '=', = 'op' => '=',
'arg_2' => = 'arg_2' =>
array ( = array (
'value' => 'child_table.id', = 'value' => 'child_table.id',
'type' => 'ident', = 'type' => 'ident',
), = ),
), = ),
'group_by' => = 'group_by' =>
array ( = array (
0 => 'parent_table.name', = 0 => 'parent_table.name',
), = ),
) = )
*********************
/data/pear/pear/SQL_Parser/tests/AllTests.php:101
PHPUnit_Framework_TestCase_Sql_Parser->select #23()
SQL seems to run fine now, please update the expected test result!
/data/pear/pear/SQL_Parser/tests/AllTests.php:90
PHPUnit_Framework_TestCase_Sql_Parser->select #24()
SQL seems to run fine now, please update the expected test result!
/data/pear/pear/SQL_Parser/tests/AllTests.php:90
PHPUnit_Framework_TestCase_Sql_Parser->select #29()
SQL still fails to be parsed
SQL: select 4b from test where 7iModule_Solution = 3
Expected:
[array with parsed SQL]
Result:
Parse error: Expected an operator on line 1
select 4b from test where 7iModule_Solution = 3
^ found: "iModule_Solution"
*********************
/data/pear/pear/SQL_Parser/tests/AllTests.php:87
PHPUnit_Framework_TestCase_Sql_Parser->tables #1()
SQL still fails to be parsed
SQL: CREATE TABLE event (
id INTEGER AUTO_INCREMENT PRIMARY KEY,
foreign_id INTEGER,
active BOOLEAN DEFAULT 'true',
status SET('canceled','sold out','rescheduled','changed location'),
category_id VARCHAR(10),
status_desc VARCHAR(40),
title VARCHAR(40),
featuring VARCHAR(40),
sponsors VARCHAR(40),
uri VARCHAR(30),
image VARCHAR(30),
description TEXT,
location_id_primary INTEGER,
location_id_secondary INTEGER,
cost VARCHAR(30),
contact_id INTEGER,
flags SET('interpreter','childcare')
)
Expected:
[array with parsed SQL]
Result:
Parse error: Unexpected token AUTO_INCREMENT on line 2
id INTEGER AUTO_INCREMENT PRIMARY KEY,
^ found: "AUTO_INCREMENT"
*********************
/data/pear/pear/SQL_Parser/tests/AllTests.php:87
PHPUnit_Framework_TestCase_Sql_Parser->tables #2()
SQL still fails to be parsed
SQL:
CREATE TABLE event_category (
id INTEGER AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(30)
)
Expected:
[array with parsed SQL]
Result:
Parse error: Unexpected token AUTO_INCREMENT on line 3
id INTEGER AUTO_INCREMENT PRIMARY KEY,
^ found: "AUTO_INCREMENT"
*********************
/data/pear/pear/SQL_Parser/tests/AllTests.php:87
PHPUnit_Framework_TestCase_Sql_Parser->tables #3()
SQL still fails to be parsed
SQL:
CREATE TABLE notice (
id INTEGER AUTO_INCREMENT PRIMARY KEY,
title VARCHAR(50),
description TEXT,
uri VARCHAR(30),
link_only BOOLEAN,
image VARCHAR(30),
)
Expected:
[array with parsed SQL]
Result:
Parse error: Unexpected token AUTO_INCREMENT on line 3
id INTEGER AUTO_INCREMENT PRIMARY KEY,
^ found: "AUTO_INCREMENT"
*********************
/data/pear/pear/SQL_Parser/tests/AllTests.php:87
PHPUnit_Framework_TestCase_Sql_Parser->tables #4()
SQL still fails to be parsed
SQL:
CREATE TABLE schedule (
id INTEGER AUTO_INCREMENT PRIMARY KEY,
event_id INTEGER,
date_start DATE,
date_finish DATE,
time_start TIME,
time_finish TIME,
repeats ENUM('once','daily','weekly','monthly'),
type ENUM('event', 'notice', 'location'),
spotlight BOOLEAN
)
Expected:
[array with parsed SQL]
Result:
Parse error: Unexpected token AUTO_INCREMENT on line 3
id INTEGER AUTO_INCREMENT PRIMARY KEY,
^ found: "AUTO_INCREMENT"
*********************
/data/pear/pear/SQL_Parser/tests/AllTests.php:87
PHPUnit_Framework_TestCase_Sql_Parser->tables #5()
SQL still fails to be parsed
SQL:
CREATE TABLE contacts (
id INTEGER AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(40),
email VARCHAR(40),
organization VARCHAR(40),
phone VARCHAR(16)
)
Expected:
[array with parsed SQL]
Result:
Parse error: Unexpected token AUTO_INCREMENT on line 3
id INTEGER AUTO_INCREMENT PRIMARY KEY,
^ found: "AUTO_INCREMENT"
*********************
/data/pear/pear/SQL_Parser/tests/AllTests.php:87
PHPUnit_Framework_TestCase_Sql_Parser->tables #6()
SQL still fails to be parsed
SQL:
CREATE TABLE location (
id INTEGER AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(40),
description VARCHAR(40),
address TEXT,
capacity INTEGER,
)
Expected:
[array with parsed SQL]
Result:
Parse error: Unexpected token AUTO_INCREMENT on line 3
id INTEGER AUTO_INCREMENT PRIMARY KEY,
^ found: "AUTO_INCREMENT"
*********************
/data/pear/pear/SQL_Parser/tests/AllTests.php:87
PHPUnit_Framework_TestCase_Sql_Parser->update #1()
SQL still fails to be parsed
SQL: update dogmeat set horse=2 dog='forty' where moose <> 'howdydoo'
Expected:
[array with parsed SQL]
Result:
Parse error: Expected "where" or "," on line 1
update dogmeat set horse=2 dog='forty' where moose <> 'howdydoo'
^ found: "dog"
*********************
/data/pear/pear/SQL_Parser/tests/AllTests.php:87
PHPUnit_Framework_TestCase_Sql_Parser->update #2()
SQL still fails to be parsed
SQL: update dogmeat set horse=2, dog='forty' where moose != 'howdydoo'
Expected:
[array with parsed SQL]
Result:
Parse error: Expected an operator on line 1
update dogmeat set horse=2, dog='forty' where moose != 'howdydoo'
^ found: "!="
*********************
/data/pear/pear/SQL_Parser/tests/AllTests.php:87
PHPUnit_Framework_TestCase_Sql_Parser->update #6()
Output format has changed
SQL: update table2 set col=1 where col > 2 and col <> 4 or dog="Hello"
array ( = array (
'command' => 'update', = 'command' => 'update',
'table_names' => = 'table_names' =>
array ( = array (
0 => 'table2', = 0 => 'table2',
), = ),
'column_names' => = 'column_names' =>
array ( = array (
0 => 'col', = 0 => 'col',
), = ),
'values' => = 'values' =>
array ( = array (
0 => = 0 =>
array ( = array (
'value' => 1, = 'value' => 1,
'type' => 'int_val', = 'type' => 'int_val',
), = ),
), = ),
'where_clause' => = 'where_clause' =>
array ( = array (
'arg_1' => = 'arg_1' =>
array ( = array (
'arg_1' => = 'arg_1' =>
array ( = array (
'value' => 'col', = 'value' => 'col',
'type' => 'ident', = 'type' => 'ident',
), = ),
'op' => '>', = 'op' => '>',
'arg_2' => = 'arg_2' =>
array ( = array (
'value' => 2, = 'value' => 2,
'type' => 'int_val', = 'type' => 'int_val',
), = ),
), = ),
'op' => 'and', = 'op' => 'and',
'arg_2' => = 'arg_2' =>
array ( = array (
'arg_1' => = 'arg_1' =>
array ( = array (
'arg_1' => = 'arg_1' =>
array ( = array (
'value' => 'col', = 'value' => 'col',
'type' => 'ident', = 'type' => 'ident',
), = ),
'op' => '<>', = 'op' => '<>',
'arg_2' => = 'arg_2' =>
array ( = array (
'value' => 4, = 'value' => 4,
'type' => 'int_val', = 'type' => 'int_val',
), = ),
), = ),
'op' => 'or', = 'op' => 'or',
'arg_2' => = 'arg_2' =>
array ( = array (
'arg_1' => = 'arg_1' =>
array ( = array (
'value' => 'dog', = 'value' => 'dog',
'type' => 'ident', = 'type' => 'ident',
), = ),
'op' => '=', = 'op' => '=',
'arg_2' => = 'arg_2' =>
array ( = array (
'value' => 'Hello', = 'value' => 'Hello',
'type' => 'text_val', ! 'type' => 'ident',
), = ),
), = ),
), = ),
), = ),
) = )
*********************
/data/pear/pear/SQL_Parser/tests/AllTests.php:101