protected function makeSurePathIsAbsolute($path): string
    {
        $site_url = rtrim($this->getParameter('site_url'), '/') . '/';

        if (0 !== strpos($path, 'http')) {
            return $site_url . ltrim($path, '/');
        } else {
            return $path;
        }
    }
protected function makeSurePathIsAbsolute($path): string
    {
        $site_url = rtrim($this->getParameter('site_url'), '/') . '/';

        if (0 !== strpos($path, 'http')) {
            return $site_url . ltrim($path, '/');
        } else {
            return $path;
        }
    }
protected function makeSurePathIsAbsolute ( $ path ) : string { $ site_url = rtrim ( $ this -> getParameter ( 'site_url' ) , '/' ) . '/' ; if ( 0 !== strpos ( $ path , 'http' ) ) { return $ site_url . ltrim ( $ path , '/' ) ; } else { return $ path ; } }
We use WordHat's site_url property rather than Mink's base_url property
to get the correct URL to wp-admin, wp-login.php etc.

@param string $path Relative path of this page

@return string Absolute URL
We use WordHat s site_url property rather than Mink s base_url property to get the correct URL to wp - admin wp - login . php etc .