fix bug in columnList(), add test
This commit is contained in:
@@ -486,7 +486,7 @@ class MeekroDB {
|
|||||||
$columns[$row['Field']] = array(
|
$columns[$row['Field']] = array(
|
||||||
'type' => $row['Type'],
|
'type' => $row['Type'],
|
||||||
'null' => $row['Null'],
|
'null' => $row['Null'],
|
||||||
'key' => $row['Type'],
|
'key' => $row['Key'],
|
||||||
'default' => $row['Default'],
|
'default' => $row['Default'],
|
||||||
'extra' => $row['Extra']
|
'extra' => $row['Extra']
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -279,7 +279,10 @@ class BasicTest extends SimpleTest {
|
|||||||
$columns = DB::columnList('store data');
|
$columns = DB::columnList('store data');
|
||||||
$this->assert(count($columns) === 2);
|
$this->assert(count($columns) === 2);
|
||||||
$this->assert($columns['picture']['type'] === 'blob');
|
$this->assert($columns['picture']['type'] === 'blob');
|
||||||
|
$this->assert($columns['picture']['null'] === 'YES');
|
||||||
|
$this->assert($columns['picture']['key'] === '');
|
||||||
|
$this->assert($columns['picture']['default'] === NULL);
|
||||||
|
$this->assert($columns['picture']['extra'] === '');
|
||||||
|
|
||||||
$smile = file_get_contents(__DIR__ . '/smile1.jpg');
|
$smile = file_get_contents(__DIR__ . '/smile1.jpg');
|
||||||
DB::insert('store data', array(
|
DB::insert('store data', array(
|
||||||
|
|||||||
Reference in New Issue
Block a user