-
Notifications
You must be signed in to change notification settings - Fork 3
Add migration generator tests #69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
# Conflicts: # phpunit.xml # tests/Support/NovaTestMockTrait.php
# Conflicts: # phpunit.xml # tests/Support/NovaTestMockTrait.php # tests/TestCase.php
DenTray
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's return to this after factory pull request will be mnerged
refs: #49
| } | ||
|
|
||
| throw new Exception('Unknown fieldType in MigrationGenerator'); | ||
| throw new UnknownFieldTypeException("Unknown field type {$typeName} in MigrationGenerator."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's move message generation into the exception class
| throw new UnknownFieldTypeException("Unknown field type {$typeName} in MigrationGenerator."); | |
| throw new UnknownFieldTypeException($typeName, 'MigrationGenerator'); |
tests/MigrationGeneratorTest.php
Outdated
| $this->expectException(UnknownFieldTypeException::class); | ||
| $this->expectExceptionMessage('Unknown field type unknown-type in MigrationGenerator.'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please use assertExceptionThrew helper
tests/MigrationGeneratorTest.php
Outdated
| $this->assertGeneratedFileEquals('migrations.php', 'database/migrations/2022_02_02_000000_posts_create_table.php'); | ||
| } | ||
|
|
||
| public function testMethodForMYSQLConnection() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please just check mysql driver using separate fixture of resulted dump
Issue #49