Skip to content

Commit

Permalink
Fix issue with column order
Browse files Browse the repository at this point in the history
  • Loading branch information
lcharette committed Nov 10, 2023
1 parent 67a638f commit d2d0dca
Showing 1 changed file with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,13 @@ public function testRepositoryCreation(): void
$this->assertTrue($builder->hasTable('migrationTest'));
$this->assertTrue($repository->exists());

// Check table structure
$this->assertSame([
'id',
'migration',
'batch',
], $builder->getColumnListing('migrationTest'));
// Check table structure. Need to sort, because order of columns can be
// different based on database driver
$expected = ['id', 'migration', 'batch'];
$actual = $builder->getColumnListing('migrationTest');
sort($expected);
sort($actual);
$this->assertSame($expected, $actual);

// Delete repository
$repository->delete();
Expand Down

0 comments on commit d2d0dca

Please sign in to comment.