Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
robert.kubac committed Aug 24, 2022
1 parent 9206c46 commit 67065b1
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 8 deletions.
1 change: 0 additions & 1 deletion src/PHPSQLParser/processors/ColumnDefinitionProcessor.php
Expand Up @@ -187,7 +187,6 @@ public function process($tokens) {
continue 2;

case 'CHAR':
case 'CHARACTER': // Alias for CHAR
$expr[] = array('expr_type' => ExpressionType::DATA_TYPE, 'base_expr' => $trim, 'length' => false);
$currCategory = 'SINGLE_PARAM_PARENTHESIS';
$prevCategory = 'TEXT';
Expand Down
5 changes: 2 additions & 3 deletions tests/cases/parser/issue320Test.php
Expand Up @@ -39,9 +39,8 @@
*/
namespace PHPSQLParser\Test\Parser;
use PHPSQLParser\PHPSQLParser;
use PHPSQLParser\PHPSQLCreator;

class issue320Test extends \PHPUnit_Framework_TestCase
class issue320Test extends \PHPUnit\Framework\TestCase
{
public function test_no_warning_is_issued_when_help_table_is_used()
{
Expand All @@ -51,7 +50,7 @@ public function test_no_warning_is_issued_when_help_table_is_used()
// there currently is an exception because `HELP` is a keyword
// but this query seems valid at least in mysql and mssql
// so ideally PHPSQLParser would be able to parse it
$this->setExpectedException(
$this->expectException(
'\PHPSQLParser\exceptions\UnableToCalculatePositionException'
);

Expand Down
2 changes: 1 addition & 1 deletion tests/cases/parser/issue335Test.php
Expand Up @@ -39,7 +39,7 @@

use PHPSQLParser\PHPSQLParser;

class issue335Test extends \PHPUnit_Framework_TestCase
class issue335Test extends \PHPUnit\Framework\TestCase
{
/**
* @test
Expand Down
5 changes: 2 additions & 3 deletions tests/cases/parser/issue355Test.php
Expand Up @@ -11,7 +11,6 @@ public function testIssue322()
$sql = "
CREATE TABLE `test_alias` (
`a` INTEGER,
`b` CHARACTER(10),
`c` VARCHARACTER(10),
`d` INT2,
`e` INT3,
Expand All @@ -24,9 +23,9 @@ public function testIssue322()
";
$parser = new PHPSQLParser();
$parser->parse($sql, true);
// We expect to see 10 parsed columns
// We expect to see 9 parsed columns
$this->assertEquals(
10,
9,
count($parser->parsed['TABLE']['create-def']['sub_tree'])
);

Expand Down

0 comments on commit 67065b1

Please sign in to comment.