public function throwsException($exceptionClassOrObject): ObjectExceptionMatcher {
        $class = is_string($exceptionClassOrObject) ? $exceptionClassOrObject : get_class($exceptionClassOrObject);
        $matcher = $this->createInternalMatcherWithDescription(ObjectExceptionMatcher::class, 'I see that exception "' . $class . '"');

        $matcher->exceptionClassOrObject = $exceptionClassOrObject;

        return $matcher;
    }
public function throwsException($exceptionClassOrObject): ObjectExceptionMatcher {
        $class = is_string($exceptionClassOrObject) ? $exceptionClassOrObject : get_class($exceptionClassOrObject);
        $matcher = $this->createInternalMatcherWithDescription(ObjectExceptionMatcher::class, 'I see that exception "' . $class . '"');

        $matcher->exceptionClassOrObject = $exceptionClassOrObject;

        return $matcher;
    }
public function throwsException ( $ exceptionClassOrObject ) : ObjectExceptionMatcher { $ class = is_string ( $ exceptionClassOrObject ) ? $ exceptionClassOrObject : get_class ( $ exceptionClassOrObject ) ; $ matcher = $ this -> createInternalMatcherWithDescription ( ObjectExceptionMatcher :: class , 'I see that exception "' . $ class . '"' ) ; $ matcher -> exceptionClassOrObject = $ exceptionClassOrObject ; return $ matcher ; }
Start sub-chain of exception matcher.

@param \Exception|string $exceptionClassOrObject exception class or object that going to be thrown by object

@return ObjectExceptionMatcher
Start sub - chain of exception matcher .