src/Assertions/Base/AbstractAssert.php
/**
     * Test assertion against a page result.
     *
     * @since 1.0.0
     *
     * @param PageResultInterface $pageResult The page result.
     *
     * @return AssertResultInterface The test result.
     */
Test assertion against a page result.

@param PageResultInterface $pageResult The page result.

@return AssertResultInterface The test result.
Test assertion against a page result . @param PageResultInterface $pageResult The page result . @return AssertResultInterface The test result .
public function test(PageResultInterface $pageResult): AssertResultInterface
    {
        $result = $this->onTest($pageResult);
        if ($this->getModifiers()->isNot()) {
            $result = !$result;
        }
        if (!$result) {
            $error = $this->onFail($pageResult);
            $modifiers = $this->getModifiers()->__toString();
            if ($modifiers !== '') {
                $error .= ' ' . $modifiers;
            }
            return new AssertResult($this, false, $error);
        }
        return new AssertResult($this);
    }
public function test ( PageResultInterface $ pageResult ) : AssertResultInterface { $ result = $ this -> onTest ( $ pageResult ) ; if ( $ this -> getModifiers ( ) -> isNot ( ) ) { $ result = ! $ result ; } if ( ! $ result ) { $ error = $ this -> onFail ( $ pageResult ) ; $ modifiers = $ this -> getModifiers ( ) -> __toString ( ) ; if ( $ modifiers !== '' ) { $ error .= ' ' . $ modifiers ; } return new AssertResult ( $ this , false , $ error ) ; } return new AssertResult ( $ this ) ; }
Test assertion against a page result.
Test assertion against a page result .