Mock php functions

I make a symfony 4 reusable bundle for my projects. I want to test it with a coverage nearby 100%. But i don't know how to test some part of my code who depends of php functions.

example :

public function getStatusCode(\Exception $exception)
    if ($exception instanceof HttpExceptionInterface) {
        return $exception->getStatusCode();
    if (is_a($exception, "Symfony\Component\Security\Core\Exception\AccessDeniedException")) {
        return Response::HTTP_UNAUTHORIZED; // I want to test this
    return Response::HTTP_INTERNAL_SERVER_ERROR;

I try to use getMockBuilder but the mock's class is not correct.

Is there a way to mock or replace is_a or to create a mock whose class is the same as that in condition?