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

ability to set messages to assertions #2

Closed
riboflan opened this issue Dec 13, 2018 · 1 comment
Closed

ability to set messages to assertions #2

riboflan opened this issue Dec 13, 2018 · 1 comment

Comments

@riboflan
Copy link

Hi,

in first thank you for this handy package. It saves me lot of time.

This is only question about possibility to have this feature.

As in phpunit there you can do something like:
$this->assertEquals( 5, 6, "Multiplying 2 and 3 did not return 6");

Implementation of $message variable can be seen in PHPUnit\Framework\Assert class.

source: http://www.kreamer.org/phpunit-cookbook/1.0/assertions/display-useful-message-when-test-fails

I am just writing some integration tests that covers authorization testing. If the test fails then there is error in role settings in app. It can be handy to show info in console like:

$this->doRead($testingSubject)->assertStatus(403, 'In most cases this is wrong role settings in Bouncer');

This is only idea :).

Thanks.

@lindyhopchris
Copy link
Member

Yes, thanks for the suggestion. There's definitely some assertions that could support messages, like the status one.

I'll take a look through and see where these can be added, but feel free to submit any PRs for the main ones you want to add in if you have time.

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

No branches or pull requests

2 participants