Skip to content

Conversation

@Skyree
Copy link
Collaborator

@Skyree Skyree commented Sep 12, 2018

  • Allows multiple exception assertions within one test

Example

public function fooTest()
{
    $foo = new Foo();
    $callableBar = function () use ($foo) {
        $foo->getBar();
    };
    $callableBaz = function () use ($foo) {
        $foo->getBaz();
    };
    $this->assertCallableThrowsException($callableBar, \RuntimeException::class);
    $this->assertCallableThrowsException($callableBaz, \LogicException::class);
}

@Skyree Skyree requested a review from velkuns February 21, 2020 11:35
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

Successfully merging this pull request may close these issues.

1 participant