-
Notifications
You must be signed in to change notification settings - Fork 7
Updating deprecated @expectedException annotations #12
base: master
Are you sure you want to change the base?
Conversation
…exception message.
Thank you! Let's see the tests to finish |
Coding standards are violated. Try running |
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.
Thank you work your work. Unfortunately, some of the changes are implemented and have to be removed (see suggestions)
$this->expectException(\Spiral\Migrations\Exception\Operation\ColumnException::class); | ||
$this->expectExceptionMessageMatches("/Unable to rename column '.+'\.'.+', column does not exists/"); | ||
|
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->expectException(\Spiral\Migrations\Exception\Operation\ColumnException::class); | |
$this->expectExceptionMessageMatches("/Unable to rename column '.+'\.'.+', column does not exists/"); |
$this->expectException(\Spiral\Migrations\Exception\Operation\ForeignKeyException::class); | ||
$this->expectExceptionMessageMatches("/Unable to add foreign key '.+'\.(.+), foreign key already exists/"); | ||
|
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->expectException(\Spiral\Migrations\Exception\Operation\ForeignKeyException::class); | |
$this->expectExceptionMessageMatches("/Unable to add foreign key '.+'\.(.+), foreign key already exists/"); |
$this->expectException(\Spiral\Migrations\Exception\Operation\ForeignKeyException::class); | ||
$this->expectExceptionMessageMatches("/Unable to drop foreign key '.+'\.'.+', foreign key does not exists/"); | ||
|
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->expectException(\Spiral\Migrations\Exception\Operation\ForeignKeyException::class); | |
$this->expectExceptionMessageMatches("/Unable to drop foreign key '.+'\.'.+', foreign key does not exists/"); |
$this->expectException(\Spiral\Migrations\Exception\Operation\ForeignKeyException::class); | ||
$this->expectExceptionMessageMatches("/Unable to alter foreign key '.+'\.'.+', foreign column '.+'\.'.+' does not exists/"); | ||
|
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->expectException(\Spiral\Migrations\Exception\Operation\ForeignKeyException::class); | |
$this->expectExceptionMessageMatches("/Unable to alter foreign key '.+'\.'.+', foreign column '.+'\.'.+' does not exists/"); |
$this->expectException(\Spiral\Migrations\Exception\Operation\ForeignKeyException::class); | ||
$this->expectExceptionMessageMatches("/Unable to alter foreign key '.+'\.'.+', foreign table '.+' does not exists/"); | ||
|
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->expectException(\Spiral\Migrations\Exception\Operation\ForeignKeyException::class); | |
$this->expectExceptionMessageMatches("/Unable to alter foreign key '.+'\.'.+', foreign table '.+' does not exists/"); |
$this->expectException(\Spiral\Migrations\Exception\Operation\TableException::class); | ||
$this->expectExceptionMessageMatches("/Unable to update table '.+'\.'.+', no table exists/"); | ||
|
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->expectException(\Spiral\Migrations\Exception\Operation\TableException::class); | |
$this->expectExceptionMessageMatches("/Unable to update table '.+'\.'.+', no table exists/"); |
$this->expectException(\Spiral\Migrations\Exception\Operation\TableException::class); | ||
$this->expectExceptionMessageMatches("/Unable to create table '.+'\.'.+', table already exists/"); | ||
|
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->expectException(\Spiral\Migrations\Exception\Operation\TableException::class); | |
$this->expectExceptionMessageMatches("/Unable to create table '.+'\.'.+', table already exists/"); |
$this->expectException(\Spiral\Migrations\Exception\Operation\TableException::class); | ||
$this->expectExceptionMessageMatches("/Unable to create table '.+'\.'.+', no columns were added/"); | ||
|
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->expectException(\Spiral\Migrations\Exception\Operation\TableException::class); | |
$this->expectExceptionMessageMatches("/Unable to create table '.+'\.'.+', no columns were added/"); |
$this->expectException(\Spiral\Migrations\Exception\Operation\TableException::class); | ||
$this->expectExceptionMessageMatches("/Unable to drop table '.+'\.'.+', table does not exists/"); | ||
|
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->expectException(\Spiral\Migrations\Exception\Operation\TableException::class); | |
$this->expectExceptionMessageMatches("/Unable to drop table '.+'\.'.+', table does not exists/"); |
$this->expectException(\Spiral\Migrations\Exception\Operation\TableException::class); | ||
$this->expectExceptionMessageMatches("/Unable to set primary keys for table '.+'\.'.+', table already exists/"); | ||
|
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->expectException(\Spiral\Migrations\Exception\Operation\TableException::class); | |
$this->expectExceptionMessageMatches("/Unable to set primary keys for table '.+'\.'.+', table already exists/"); |
Removes deprecated annotations.
And also add asserting exception message. Not sure that this right. Can remove it.