Skip to content

Commit

Permalink
php 5.3
Browse files Browse the repository at this point in the history
  • Loading branch information
iamcal committed May 4, 2021
1 parent a767323 commit 776af98
Showing 1 changed file with 74 additions and 74 deletions.
148 changes: 74 additions & 74 deletions tests/FullTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,44 +19,44 @@ public function testBasicCases($sql, $expected)

public function parseProvider()
{
return [
[
return array(
array(
"CREATE TABLE table_name (a INT);\n"
. "-- ignored comment\n\n"
. "CREATE TABLE t2 (b VARCHAR)\n\n;\n",
[
'table_name' => [
array(
'table_name' => array(
'name' => 'table_name',
'database' => null,
'fields' => [
[
'fields' => array(
array(
'name' => 'a',
'type' => 'INT',
],
],
'indexes' => [],
'props' => [],
'more' => [],
),
),
'indexes' => array(),
'props' => array(),
'more' => array(),
'sql' => 'CREATE TABLE table_name (a INT);',
],
't2' => [
),
't2' => array(
'name' => 't2',
'database' => null,
'fields' => [
[
'fields' => array(
array(
'name' => 'b',
'type' => 'VARCHAR',
],
],
'indexes' => [],
'props' => [],
'more' => [],
),
),
'indexes' => array(),
'props' => array(),
'more' => array(),
'sql' => "CREATE TABLE t2 (b VARCHAR)\n\n;",
],
),

]
],
[
)
),
array(
'CREATE TABLE DbName.TableName (
id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
errcnt INT(10) UNSIGNED NOT NULL DEFAULT \'0\',
Expand All @@ -69,97 +69,97 @@ public function parseProvider()
KEY (place_id, next_processing_time),
UNIQUE KEY (user_id, place_id, photo_id)
);',
[
'DbName.TableName' => [
array(
'DbName.TableName' => array(
'name' => 'TableName',
'database' => 'DbName',
'fields' => [
[
'fields' => array(
array(
'name' => 'id',
'type' => 'BIGINT',
'unsigned' => true,
'null' => false,
'auto_increment' => true,
],
[
),
array(
'name' => 'errcnt',
'type' => 'INT',
'length' => '10',
'unsigned' => true,
'null' => false,
'default' => '0',
],
[
),
array(
'name' => 'user_id',
'type' => 'INT',
'unsigned' => true,
'null' => false,
],
[
),
array(
'name' => 'photo_id',
'type' => 'INT',
'unsigned' => true,
'null' => false,
],
[
),
array(
'name' => 'place_id',
'type' => 'INT',
'unsigned' => true,
'null' => false,
],
[
),
array(
'name' => 'next_processing_time',
'type' => 'TIMESTAMP',
'null' => false,
'default' => 'CURRENT_TIMESTAMP',
],
[
),
array(
'name' => 'created',
'type' => 'TIMESTAMP',
'null' => false,
'default' => 'CURRENT_TIMESTAMP',
],
],
'indexes' => [
[
),
),
'indexes' => array(
array(
'type' => 'PRIMARY',
'cols' =>
[
[
array(
array(
'name' => 'id',
],
],
],
[
),
),
),
array(
'type' => 'INDEX',
'cols' =>
[
[
array(
array(
'name' => 'place_id',
],
[
),
array(
'name' => 'next_processing_time',
],
],
],
[
),
),
),
array(
'type' => 'UNIQUE',
'cols' =>
[
[
array(
array(
'name' => 'user_id',
],
[
),
array(
'name' => 'place_id',
],
[
),
array(
'name' => 'photo_id',
],
],
],
],
'props' => [],
'more' => [],
),
),
),
),
'props' => array(),
'more' => array(),
'sql' => 'CREATE TABLE DbName.TableName (
id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
errcnt INT(10) UNSIGNED NOT NULL DEFAULT \'0\',
Expand All @@ -172,12 +172,12 @@ public function parseProvider()
KEY (place_id, next_processing_time),
UNIQUE KEY (user_id, place_id, photo_id)
);',
],
),

]
]
)
)

];
);
}

}

0 comments on commit 776af98

Please sign in to comment.