src/Concerns/MakesUrlAssertions.php
public function assertFragmentIs($fragment)
    {
        $pattern = preg_quote($fragment, '/');

        $actualFragment = (string) parse_url($this->driver->executeScript('return window.location.href;'), PHP_URL_FRAGMENT);

        PHPUnit::assertRegExp(
            '/^'.str_replace('\*', '.*', $pattern).'$/u', $actualFragment,
            "Actual fragment [{$actualFragment}] does not equal expected fragment [{$fragment}]."
        );

        return $this;
    }
public function assertFragmentIs($fragment)
    {
        $pattern = preg_quote($fragment, '/');

        $actualFragment = (string) parse_url($this->driver->executeScript('return window.location.href;'), PHP_URL_FRAGMENT);

        PHPUnit::assertRegExp(
            '/^'.str_replace('\*', '.*', $pattern).'$/u', $actualFragment,
            "Actual fragment [{$actualFragment}] does not equal expected fragment [{$fragment}]."
        );

        return $this;
    }
public function assertFragmentIs ( $ fragment ) { $ pattern = preg_quote ( $ fragment , '/' ) ; $ actualFragment = ( string ) parse_url ( $ this -> driver -> executeScript ( 'return window.location.href;' ) , PHP_URL_FRAGMENT ) ; PHPUnit :: assertRegExp ( '/^' . str_replace ( '\*' , '.*' , $ pattern ) . '$/u' , $ actualFragment , "Actual fragment [{$actualFragment}] does not equal expected fragment [{$fragment}]." ) ; return $ this ; }
Assert that the current URL fragment matches the given pattern.

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