Skip to content
This repository was archived by the owner on Aug 19, 2022. It is now read-only.

Commit b815ca5

Browse files
committed
Updated to 1.1.6 version
1 parent 70e1cd0 commit b815ca5

1 file changed

Lines changed: 26 additions & 5 deletions

File tree

tests/Database/Test/DatabaseCreateTest.php

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@
1717

1818
final class DatabaseCreateTest extends TestCase {
1919

20-
private $db;
21-
2220
/**
2321
* Get connection test.
2422
*
@@ -28,13 +26,36 @@ final class DatabaseCreateTest extends TestCase {
2826
*/
2927
public function testGetConnection() {
3028

31-
$this->db = Database::getConnection('identifier');
29+
$db = Database::getConnection('identifier');
3230

33-
$database = $this->db;
31+
$this->assertContains('identifier', $db::$id);
3432

35-
$this->assertContains('identifier', $database::$id);
33+
return $db;
3634
}
3735

36+
/**
37+
* [QUERY] [CREATE TABLE] [RETURN TRUE]
38+
*
39+
* @since 1.1.6
40+
*
41+
* @depends testGetConnection
42+
*
43+
* @return void
44+
*/
45+
public function testCreateTableQuery($db) {
46+
47+
$result = $db->query(
3848

49+
'CREATE TABLE IF NOT EXISTS test (
50+
51+
id INT(6) UNSIGNED AUTO_INCREMENT PRIMARY KEY,
52+
name VARCHAR(30) NOT NULL,
53+
email VARCHAR(50),
54+
reg_date TIMESTAMP
55+
)'
56+
);
57+
58+
$this->assertTrue($result);
59+
}
3960

4061
}

0 commit comments

Comments
 (0)