Skip to content
This repository was archived by the owner on Jan 24, 2024. It is now read-only.

Conversation

@aywan
Copy link
Contributor

@aywan aywan commented May 13, 2020

Removes deprecated annotations.

And also add asserting exception message. Not sure that this right. Can remove it.

@wolfy-j
Copy link
Member

wolfy-j commented May 13, 2020

Thank you! Let's see the tests to finish

@wolfy-j
Copy link
Member

wolfy-j commented May 13, 2020

Coding standards are violated. Try running vendor/bin/spiral-cs check tests and vendor/bin/spiral-cs fix tests

Copy link
Contributor

@vvval vvval left a comment

Choose a reason for hiding this comment

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

Thank you work your work. Unfortunately, some of the changes are implemented and have to be removed (see suggestions)

Comment on lines +244 to +246
$this->expectException(\Spiral\Migrations\Exception\Operation\ColumnException::class);
$this->expectExceptionMessageMatches("/Unable to rename column '.+'\.'.+', column does not exists/");

Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
$this->expectException(\Spiral\Migrations\Exception\Operation\ColumnException::class);
$this->expectExceptionMessageMatches("/Unable to rename column '.+'\.'.+', column does not exists/");

Comment on lines +451 to +453
$this->expectException(\Spiral\Migrations\Exception\Operation\ForeignKeyException::class);
$this->expectExceptionMessageMatches("/Unable to add foreign key '.+'\.(.+), foreign key already exists/");

Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
$this->expectException(\Spiral\Migrations\Exception\Operation\ForeignKeyException::class);
$this->expectExceptionMessageMatches("/Unable to add foreign key '.+'\.(.+), foreign key already exists/");

Comment on lines +427 to +429
$this->expectException(\Spiral\Migrations\Exception\Operation\ForeignKeyException::class);
$this->expectExceptionMessageMatches("/Unable to drop foreign key '.+'\.'.+', foreign key does not exists/");

Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
$this->expectException(\Spiral\Migrations\Exception\Operation\ForeignKeyException::class);
$this->expectExceptionMessageMatches("/Unable to drop foreign key '.+'\.'.+', foreign key does not exists/");

Comment on lines +394 to +396
$this->expectException(\Spiral\Migrations\Exception\Operation\ForeignKeyException::class);
$this->expectExceptionMessageMatches("/Unable to alter foreign key '.+'\.'.+', foreign column '.+'\.'.+' does not exists/");

Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
$this->expectException(\Spiral\Migrations\Exception\Operation\ForeignKeyException::class);
$this->expectExceptionMessageMatches("/Unable to alter foreign key '.+'\.'.+', foreign column '.+'\.'.+' does not exists/");

Comment on lines +365 to +367
$this->expectException(\Spiral\Migrations\Exception\Operation\ForeignKeyException::class);
$this->expectExceptionMessageMatches("/Unable to alter foreign key '.+'\.'.+', foreign table '.+' does not exists/");

Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
$this->expectException(\Spiral\Migrations\Exception\Operation\ForeignKeyException::class);
$this->expectExceptionMessageMatches("/Unable to alter foreign key '.+'\.'.+', foreign table '.+' does not exists/");

Comment on lines +91 to +93
$this->expectException(\Spiral\Migrations\Exception\Operation\TableException::class);
$this->expectExceptionMessageMatches("/Unable to update table '.+'\.'.+', no table exists/");

Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
$this->expectException(\Spiral\Migrations\Exception\Operation\TableException::class);
$this->expectExceptionMessageMatches("/Unable to update table '.+'\.'.+', no table exists/");

Comment on lines +69 to +71
$this->expectException(\Spiral\Migrations\Exception\Operation\TableException::class);
$this->expectExceptionMessageMatches("/Unable to create table '.+'\.'.+', table already exists/");

Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
$this->expectException(\Spiral\Migrations\Exception\Operation\TableException::class);
$this->expectExceptionMessageMatches("/Unable to create table '.+'\.'.+', table already exists/");

Comment on lines +52 to +54
$this->expectException(\Spiral\Migrations\Exception\Operation\TableException::class);
$this->expectExceptionMessageMatches("/Unable to create table '.+'\.'.+', no columns were added/");

Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
$this->expectException(\Spiral\Migrations\Exception\Operation\TableException::class);
$this->expectExceptionMessageMatches("/Unable to create table '.+'\.'.+', no columns were added/");

Comment on lines +35 to +37
$this->expectException(\Spiral\Migrations\Exception\Operation\TableException::class);
$this->expectExceptionMessageMatches("/Unable to drop table '.+'\.'.+', table does not exists/");

Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
$this->expectException(\Spiral\Migrations\Exception\Operation\TableException::class);
$this->expectExceptionMessageMatches("/Unable to drop table '.+'\.'.+', table does not exists/");

Comment on lines +308 to +310
$this->expectException(\Spiral\Migrations\Exception\Operation\TableException::class);
$this->expectExceptionMessageMatches("/Unable to set primary keys for table '.+'\.'.+', table already exists/");

Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
$this->expectException(\Spiral\Migrations\Exception\Operation\TableException::class);
$this->expectExceptionMessageMatches("/Unable to set primary keys for table '.+'\.'.+', table already exists/");

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants