Skip to content

Commit

Permalink
Fix issue on unit tests for "--from-database" (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
rougin authored Oct 19, 2024
1 parent ddfff48 commit 35fadcc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
7 changes: 1 addition & 6 deletions src/Template/Migration.php
Original file line number Diff line number Diff line change
Expand Up @@ -167,13 +167,8 @@ protected function getCreateColumn($table)

return function ($lines) use ($columns, $table)
{
foreach ($columns as $index => $column)
foreach ($columns as $column)
{
if ($index !== 0)
{
$lines[] = '';
}

$lines = $this->parseColumn($lines, $table, $column);
}

Expand Down
3 changes: 2 additions & 1 deletion tests/ManagerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ public function test_04_rolling_back()
*/
public function test_05_reset_to_0()
{
$this->expectException('Exception');
$this->setExpectedException('Exception');

$test = $this->findCommand('reset');

Expand Down Expand Up @@ -199,6 +199,7 @@ public function test_07_create_with_database()

// Then clear the said files ---
$this->clearFiles();
$this->useMysqlConfig();
// -----------------------------

// Create a new migration based on database ---
Expand Down

0 comments on commit 35fadcc

Please sign in to comment.