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

Ticket/11995 Fix Revert of config.remove migration #1847

Merged
merged 3 commits into from Nov 2, 2013

Conversation

nickvergessen
Copy link
Contributor

{
$this->tool->reverse('remove', 'foo');
}
catch (Exception $e)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is an explicit catch necessary?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

its just a copy from all the code around, should I change all of them?

try
{
$this->tool->add('foo', 'bar');
$this->fail('Exception not thrown');
Copy link
Contributor

Choose a reason for hiding this comment

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

Why was this test removed? We're trying to make sure an exception is thrown when adding a config var that 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.

Forgot, exceptions are not thrown for this reason anymore.

Copy link
Collaborator

Choose a reason for hiding this comment

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

If you expect an exception, you should be using the @expectedException annotation if possible. If an exception is unexpected, phpunit should turn them into a failure automatically.

EXreaction added a commit that referenced this pull request Nov 2, 2013
Ticket/11995 Fix Revert of config.remove migration
@EXreaction EXreaction merged commit 4d6c722 into phpbb:develop Nov 2, 2013
@nickvergessen nickvergessen deleted the ticket/11995 branch April 10, 2014 10:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants