original_string: public function assertThrows(
          string $class,
          callable $execute,
          callable $inspect = null
      ) : void {
          try {
              $execute();
          } catch (ExpectationFailedException $e) {
              throw $e;
          } catch (Throwable $e) {
              static::assertThat($e, new ConstraintException($class));
  
              if ($inspect !== null) {
                  $inspect($e);
              }
  
              return;
          }
  		
          static::assertThat(null, new ConstraintException($class));
      }
code: public function assertThrows(
          string $class,
          callable $execute,
          callable $inspect = null
      ) : void {
          try {
              $execute();
          } catch (ExpectationFailedException $e) {
              throw $e;
          } catch (Throwable $e) {
              static::assertThat($e, new ConstraintException($class));
  
              if ($inspect !== null) {
                  $inspect($e);
              }
  
              return;
          }
  		
          static::assertThat(null, new ConstraintException($class));
      }
code_tokens: public function assertThrows ( string $ class , callable $ execute , callable $ inspect = null ) : void { try { $ execute ( ) ; } catch ( ExpectationFailedException $ e ) { throw $ e ; } catch ( Throwable $ e ) { static :: assertThat ( $ e , new ConstraintException ( $ class ) ) ; if ( $ inspect !== null ) { $ inspect ( $ e ) ; } return ; } static :: assertThat ( null , new ConstraintException ( $ class ) ) ; }
docstring: Asserts that the callable throws a specified throwable.
  If successful and the inspection callable is not null
  then it is called and the caught exception is passed as argument.
  
  @param string        $class The exception type expected to be thrown.
  @param callable      $execute The callable.
  @param callable|null $inspect [optional] The inspector.
  @since   1.0.0
docstring_tokens: Asserts that the callable throws a specified throwable . If successful and the inspection callable is not null then it is called and the caught exception is passed as argument .