src/Concerns/MakesUrlAssertions.php
public function assertPathIs($path)
    {
        $pattern = str_replace('\*', '.*', preg_quote($path, '/'));

        $actualPath = parse_url($this->driver->getCurrentURL(), PHP_URL_PATH) ?? '';

        PHPUnit::assertRegExp(
            '/^'.$pattern.'$/u', $actualPath,
            "Actual path [{$actualPath}] does not equal expected path [{$path}]."
        );

        return $this;
    }
public function assertPathIs($path)
    {
        $pattern = str_replace('\*', '.*', preg_quote($path, '/'));

        $actualPath = parse_url($this->driver->getCurrentURL(), PHP_URL_PATH) ?? '';

        PHPUnit::assertRegExp(
            '/^'.$pattern.'$/u', $actualPath,
            "Actual path [{$actualPath}] does not equal expected path [{$path}]."
        );

        return $this;
    }
public function assertPathIs ( $ path ) { $ pattern = str_replace ( '\*' , '.*' , preg_quote ( $ path , '/' ) ) ; $ actualPath = parse_url ( $ this -> driver -> getCurrentURL ( ) , PHP_URL_PATH ) ?? '' ; PHPUnit :: assertRegExp ( '/^' . $ pattern . '$/u' , $ actualPath , "Actual path [{$actualPath}] does not equal expected path [{$path}]." ) ; return $ this ; }
Assert that the current URL path matches the given pattern.

@param  string  $path
@return $this
Assert that the current URL path matches the given pattern .