Functional\Tests\ErrorToExceptionTest::testErrorIsThrownAsException PHP Method

testErrorIsThrownAsException() public method

    public function testErrorIsThrownAsException()
    {
        $fn = error_to_exception('strpos');
        $this->expectException(ErrorException::class);
        $this->expectExceptionMessage('strpos() expects parameter 1 to be string, array given');
        $fn([], 0);
    }