Update namespaces
This commit is contained in:
24
tests/MySQLCreateTest.php
Normal file
24
tests/MySQLCreateTest.php
Normal file
@ -0,0 +1,24 @@
|
||||
<?php
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
class MySQLCreateTest extends TestCase
|
||||
{
|
||||
public function testBaseQuery(): void
|
||||
{
|
||||
$query = new Database\Implement\Query\MySQL\Create();
|
||||
$query->table('test_table');
|
||||
$query->columns('`column1` int');
|
||||
|
||||
$expected = "CREATE TABLE `test_table` (`column1` int)";
|
||||
|
||||
$this->assertEquals($expected, "{$query}");
|
||||
}
|
||||
public function testMissingColumns(): void
|
||||
{
|
||||
$query = new Database\Implement\Query\MySQL\Create();
|
||||
$query->table('test_table');
|
||||
|
||||
$this->expectException(Database\Except\Missing\Columns::class);
|
||||
echo "{$query}";
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user