public testAssertIterableFails ( callable $fn, $expectedMessage ) | ||
$fn | callable |
public function testAssertIterableFails(callable $fn, $expectedMessage)
{
$this->setExpectedException(\InvalidArgumentException::class, $expectedMessage);
$ret = $fn();
// For generators the body will not be run until the first operation
if ($ret instanceof \Generator) {
$ret->rewind();
}
}