Skip to content

Commit

Permalink
refactor: Update database types in EloquentTypeParserTest
Browse files Browse the repository at this point in the history
The database types in the EloquentTypeParserTest have been updated to include additional options for the 'id' and 'title' fields. This change ensures that the test covers a wider range of possible database types and improves the accuracy of the test results.
  • Loading branch information
ewilan-riviere committed Jul 25, 2024
1 parent 0212217 commit 171f213
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/EloquentTypeParserTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@

$id = $movie->getAttribute('id');
expect($id->name())->toBe('id');
expect($id->databaseType())->toBeIn(['character(26)', 'varchar', 'character', 'nchar']);
expect($id->databaseType())->toBeIn(['char(26)', 'character(26)', 'varchar', 'character', 'nchar', 'nchar(52)']);
expect($id->nullable())->toBeFalse();
expect($id->default())->toBeNull();
expect($id->fillable())->toBeFalse();
Expand All @@ -53,7 +53,7 @@

$title = $movie->getAttribute('title');
expect($title->name())->toBe('title');
expect($title->databaseType())->toBeIn(['varchar(255)', 'varchar', 'character varying', 'nvarchar']);
expect($title->databaseType())->toBeIn(['varchar(255)', 'character varying(255)', 'varchar', 'character varying', 'nvarchar']);
expect($title->nullable())->toBeTrue();
expect($title->default())->toBeNull();
expect($title->fillable())->toBeTrue();
Expand Down

0 comments on commit 171f213

Please sign in to comment.