From 929d90893fcbfcf94afdab43f375b7deccf39db5 Mon Sep 17 00:00:00 2001 From: Wojtek Naruniec Date: Wed, 11 Dec 2024 17:35:09 +0100 Subject: [PATCH] Add more cases to the test --- tests/WP_SQLite_Translator_Tests.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/tests/WP_SQLite_Translator_Tests.php b/tests/WP_SQLite_Translator_Tests.php index 0a79e344..b2ece64b 100644 --- a/tests/WP_SQLite_Translator_Tests.php +++ b/tests/WP_SQLite_Translator_Tests.php @@ -293,7 +293,11 @@ public function testShowCreateTableWithEmptyDatetimeDefault() { $this->assertQuery( "CREATE TABLE _tmp_table ( ID BIGINT PRIMARY KEY AUTO_INCREMENT NOT NULL, - created_at datetime NOT NULL + timestamp1 datetime NOT NULL, + timestamp2 date NOT NULL, + timestamp3 time NOT NULL, + timestamp4 timestamp NOT NULL, + timestamp5 year NOT NULL );" ); @@ -305,7 +309,11 @@ public function testShowCreateTableWithEmptyDatetimeDefault() { $this->assertEquals( "CREATE TABLE _tmp_table ( `ID` bigint PRIMARY KEY AUTO_INCREMENT NOT NULL, - `created_at` datetime NOT NULL + `timestamp1` datetime NOT NULL, + `timestamp2` date NOT NULL, + `timestamp3` time NOT NULL, + `timestamp4` timestamp NOT NULL, + `timestamp5` year NOT NULL );", $results[0]->{'Create Table'} );