From b0eaecdc227012723b2a0c8e01eb5a0ec0968103 Mon Sep 17 00:00:00 2001 From: Mark Story Date: Sat, 30 Mar 2013 21:41:38 -0400 Subject: [PATCH] Add more tests for Mysql. Add tests for default values and boolean columns. --- .../Model/Datasource/Database/Driver/MysqlTest.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/lib/Cake/Test/TestCase/Model/Datasource/Database/Driver/MysqlTest.php b/lib/Cake/Test/TestCase/Model/Datasource/Database/Driver/MysqlTest.php index a187632beb8..65316234ccb 100644 --- a/lib/Cake/Test/TestCase/Model/Datasource/Database/Driver/MysqlTest.php +++ b/lib/Cake/Test/TestCase/Model/Datasource/Database/Driver/MysqlTest.php @@ -129,6 +129,8 @@ protected function _createTables($connection) { title VARCHAR(20) COMMENT 'A title', body TEXT, author_id INT(11) NOT NULL, +published BOOLEAN DEFAULT 0, +allow_comments TINYINT(1) DEFAULT 0, created DATETIME ) COLLATE=utf8_general_ci SQL; @@ -294,6 +296,18 @@ public function testDescribeTable() { 'default' => null, 'length' => 11, ], + 'published' => [ + 'type' => 'boolean', + 'null' => true, + 'default' => 0, + 'length' => null, + ], + 'allow_comments' => [ + 'type' => 'boolean', + 'null' => true, + 'default' => 0, + 'length' => null, + ], 'created' => [ 'type' => 'datetime', 'null' => true,