Functional\Tests\SuppressErrorTest::testExceptionsAreHandledTransparently PHP Method

testExceptionsAreHandledTransparently() public method

    public function testExceptionsAreHandledTransparently()
    {
        $expectedException = new RuntimeException();
        $fn = suppress_error(function () use($expectedException) {
            throw $expectedException;
        });
        $this->expectException(RuntimeException::class);
        $fn();
    }