mirror of
https://github.com/e107inc/e107.git
synced 2025-03-28 08:12:42 +01:00
dbverify test for json field added.
This commit is contained in:
parent
9d817a9cc9
commit
cc8b641072
@ -26,6 +26,8 @@
|
||||
{
|
||||
$this->fail("Couldn't load db_verify object");
|
||||
}
|
||||
|
||||
$this->dbv->__construct();
|
||||
}
|
||||
/*
|
||||
public function testGetFields()
|
||||
@ -180,6 +182,17 @@
|
||||
KEY `banlist_ip` (`banlist_ip`)
|
||||
) ENGINE=MyISAM AUTO_INCREMENT=182 DEFAULT CHARSET=utf8;",
|
||||
|
||||
'test_json' =>
|
||||
"CREATE TABLE `e107_test_comment` (
|
||||
`eml_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`eml_hash` varchar(20) NOT NULL,
|
||||
`eml_datestamp` int(11) unsigned NOT NULL,
|
||||
`eml_json` JSON NOT NULL,
|
||||
`eml_to` varchar(50) NOT NULL,
|
||||
PRIMARY KEY (`eml_id`),
|
||||
UNIQUE KEY `eml_hash` (`eml_hash`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;",
|
||||
|
||||
'test_comment' =>
|
||||
"CREATE TABLE `e107_test_comment` (
|
||||
`eml_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
||||
@ -302,6 +315,28 @@
|
||||
),
|
||||
),
|
||||
|
||||
|
||||
'test_json' => array (
|
||||
'tables' =>
|
||||
array (
|
||||
0 => 'test_comment',
|
||||
),
|
||||
'data' =>
|
||||
array (
|
||||
0 => '`eml_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`eml_hash` varchar(20) NOT NULL,
|
||||
`eml_datestamp` int(11) unsigned NOT NULL,
|
||||
`eml_json` JSON NOT NULL,
|
||||
`eml_to` varchar(50) NOT NULL,
|
||||
PRIMARY KEY (`eml_id`),
|
||||
UNIQUE KEY `eml_hash` (`eml_hash`)',
|
||||
),
|
||||
'engine' =>
|
||||
array (
|
||||
0 => 'MyISAM',
|
||||
),
|
||||
),
|
||||
|
||||
'test_comment' => array (
|
||||
'tables' =>
|
||||
array (
|
||||
@ -368,7 +403,10 @@
|
||||
|
||||
$actual = $this->dbv->getSqlFileTables($sql);
|
||||
|
||||
|
||||
/* if($table == 'test_json')
|
||||
{
|
||||
var_export($actual);
|
||||
}*/
|
||||
|
||||
$this->assertEquals($actual['tables'], $expected[$table]['tables'], "Table ".$table." could not be parsed.");
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user