Codeception / Specify

BDD style code blocks for PHPUnit / Codeception
MIT License
156 stars 22 forks source link

Exception message #17

Closed electricjones closed 9 years ago

electricjones commented 9 years ago

Referring to #16, this PR makes it possible to optionally test the exception message.

Of course, this is only an enhancement, the current api has not changed.

$this->specify('user is invalid', function() {
            throw new RuntimeException("test message");
        }, ['throws' => ["RuntimeException()", "test message"]]);

A couple notes

I am willing to mix this up if needed. We needed this for our team and just thought I'd share it with the world.

DavertMik commented 9 years ago

Thanks. I'll release a new version for that

electricjones commented 9 years ago

Appreciate it. If you need anything else, let me know.