public function assertUrlIs($url)
    {
        $pattern = str_replace('\*', '.*', preg_quote($url, '/'));

        $segments = parse_url($this->driver->getCurrentURL());

        $currentUrl = sprintf(
            '%s://%s%s%s',
            $segments['scheme'],
            $segments['host'],
            Arr::get($segments, 'port', '') ? ':'.$segments['port'] : '',
            Arr::get($segments, 'path', '')
        );

        PHPUnit::assertRegExp(
            '/^'.$pattern.'$/u', $currentUrl,
            "Actual URL [{$this->driver->getCurrentURL()}] does not equal expected URL [{$url}]."
        );

        return $this;
    }