src/Assertions/AssertHeader.php
/**
     * Called when a test is performed on a page result.
     *
     * @since 1.1.0
     *
     * @param PageResultInterface $pageResult The page result.
     *
     * @return bool True if test was successful, false otherwise.
     */
Called when a test is performed on a page result.

@param PageResultInterface $pageResult The page result.

@return bool True if test was successful, false otherwise.
Called when a test is performed on a page result . @param PageResultInterface $pageResult The page result . @return bool True if test was successful false otherwise .
protected function onTest(PageResultInterface $pageResult): bool
    {
        $headers = $pageResult->getHeaders();
        foreach ($headers as $header) {
            [$headerName, $headerValue] = self::splitHeader($header);
            if ($this->nameAndValueMatches($headerName, $headerValue)) {
                return true;
            }
        }
        return false;
    }
protected function onTest ( PageResultInterface $ pageResult ) : bool { $ headers = $ pageResult -> getHeaders ( ) ; foreach ( $ headers as $ header ) { [ $ headerName , $ headerValue ] = self :: splitHeader ( $ header ) ; if ( $ this -> nameAndValueMatches ( $ headerName , $ headerValue ) ) { return true ; } } return false ; }
Called when a test is performed on a page result.
Called when a test is performed on a page result .