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;
    }