public function result(callable $predicate, string $description = null): self
    {
        $this->runCode();
        if (null !== $this->exception) {
            throw new AssertionFailure(
                    'Failed asserting that result '
                    . Predicate::castFrom($predicate)
                    . ' because exception of type '
                    . get_class($this->exception)
                    . ' with message "' . $this->exception->getMessage()
                    . '" was thrown.'
            );
        }

        assertThat($this->result, $predicate, $description);
        return $this;
    }
public function result(callable $predicate, string $description = null): self
    {
        $this->runCode();
        if (null !== $this->exception) {
            throw new AssertionFailure(
                    'Failed asserting that result '
                    . Predicate::castFrom($predicate)
                    . ' because exception of type '
                    . get_class($this->exception)
                    . ' with message "' . $this->exception->getMessage()
                    . '" was thrown.'
            );
        }

        assertThat($this->result, $predicate, $description);
        return $this;
    }
public function result ( callable $ predicate , string $ description = null ) : self { $ this -> runCode ( ) ; if ( null !== $ this -> exception ) { throw new AssertionFailure ( 'Failed asserting that result ' . Predicate :: castFrom ( $ predicate ) . ' because exception of type ' . get_class ( $ this -> exception ) . ' with message "' . $ this -> exception -> getMessage ( ) . '" was thrown.' ) ; } assertThat ( $ this -> result , $ predicate , $ description ) ; return $ this ; }
asserts result of executed code fulfills a predicate

@param   \bovigo\assert\predicate\Predicate|callable  $predicate    predicate or callable to test given value
@param   string                                       $description  optional  additional description for failure message
@return  \bovigo\assert\Expectation
asserts result of executed code fulfills a predicate