public function assertNotThrows(string $class, callable $execute) : void
    {
        try {
            $execute();
        } catch (ExpectationFailedException $e) {
            throw $e;
        } catch (Throwable $e) {
            static::assertThat($e, new LogicalNot(new ConstraintException($class)));

            return;
        }

        static::assertThat(null, new LogicalNot(new ConstraintException($class)));
    }
public function assertNotThrows(string $class, callable $execute) : void
    {
        try {
            $execute();
        } catch (ExpectationFailedException $e) {
            throw $e;
        } catch (Throwable $e) {
            static::assertThat($e, new LogicalNot(new ConstraintException($class)));

            return;
        }

        static::assertThat(null, new LogicalNot(new ConstraintException($class)));
    }
public function assertNotThrows ( string $ class , callable $ execute ) : void { try { $ execute ( ) ; } catch ( ExpectationFailedException $ e ) { throw $ e ; } catch ( Throwable $ e ) { static :: assertThat ( $ e , new LogicalNot ( new ConstraintException ( $ class ) ) ) ; return ; } static :: assertThat ( null , new LogicalNot ( new ConstraintException ( $ class ) ) ) ; }
Asserts that the callable doesn't throw a specified exception.

@param string   $class The exception type expected not to be thrown.
@param callable $execute The callable.
@since   1.0.0
Asserts that the callable doesn t throw a specified exception .