-
Notifications
You must be signed in to change notification settings - Fork 0
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
Feature/tests #2
base: feature/package
Are you sure you want to change the base?
Conversation
What have all these docker files to do with the tests? |
*/ | ||
public function canGetDatabaseConfigOfProject(): void | ||
{ | ||
$this->assertTrue(array_key_exists('driver', app('meltor')->getDatabaseConfig())); |
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.
$this->assertTrue(array_key_exists('driver', app('meltor')->getDatabaseConfig())); | |
$this->assertArrayHasKey('driver', app('meltor')->getDatabaseConfig()); |
public function canGetExtraFromColumn(): void | ||
{ | ||
$validColumn = $this->getDummyColumn(); | ||
$validAutoIncrementColumn = $this->getDummyColumn('int', 'int', 'int', 'auto_increment'); |
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.
$validAutoIncrementColumn = $this->getDummyColumn('int', 'int', 'int', 'auto_increment'); | |
$validAutoIncrementColumn = $this->getDummyColumn(mysqlType: 'int', columnType: 'int', dataType: 'int', extra: 'auto_increment'); |
This makes it a little more readable.
|
||
// Invalid MySQL COLUMN_TYPE | ||
$this->expectException(Exception::class); | ||
$this->runProtectedMethod('getColumnType', [$invalidTypeColumn]); |
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.
Any reason why this method cannot be public?
protected function runProtectedMethod(string $methodName, array $params) | ||
{ | ||
$method = $this->getAccessibleReflectionMethod($methodName); | ||
return $method->invoke(app('meltor'), ...$params); |
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.
return $method->invoke(app('meltor'), ...$params); | |
return $method->invoke(app('meltor'), ...$params); |
No description provided.