Skip to content

Commit

Permalink
Add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mtawil committed Dec 14, 2023
1 parent 0c763c1 commit 8abdac0
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/Database/DatabaseMySqlSchemaGrammarTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,18 @@ public function testBasicCreateTable()

$this->assertCount(1, $statements);
$this->assertSame('alter table `users` add `id` int unsigned not null auto_increment primary key, add `email` varchar(255) not null', $statements[0]);

$blueprint = new Blueprint('users');
$blueprint->create();
$blueprint->uuid('id')->primary();

$conn = $this->getConnection();
$conn->shouldReceive('getConfig')->andReturn(null);

$statements = $blueprint->toSql($conn, $this->getGrammar());

$this->assertCount(1, $statements);
$this->assertSame('create table `users` (`id` char(36) not null, primary key (`id`))', $statements[0]);
}

public function testAutoIncrementStartingValue()
Expand Down

0 comments on commit 8abdac0

Please sign in to comment.