Skip to content
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

Open
wants to merge 2 commits into
base: feature/package
Choose a base branch
from
Open

Feature/tests #2

wants to merge 2 commits into from

Conversation

gael-connan-cybex
Copy link
Contributor

No description provided.

@lupinitylabs
Copy link
Member

What have all these docker files to do with the tests?

*/
public function canGetDatabaseConfigOfProject(): void
{
$this->assertTrue(array_key_exists('driver', app('meltor')->getDatabaseConfig()));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
$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');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
$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]);
Copy link
Member

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);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
return $method->invoke(app('meltor'), ...$params);
return $method->invoke(app('meltor'), ...$params);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants