public function seeInCurrentRoute($routeName)
    {
        $router = $this->grabService('router');
        if (!$router->getRouteCollection()->get($routeName)) {
            $this->fail(sprintf('Route with name "%s" does not exists.', $routeName));
        }

        $uri = explode('?', $this->grabFromCurrentUrl())[0];
        try {
            $matchedRouteName = $router->match($uri)['_route'];
        } catch (\Symfony\Component\Routing\Exception\ResourceNotFoundException $e) {
            $this->fail(sprintf('The "%s" url does not match with any route', $uri));
        }

        $this->assertEquals($matchedRouteName, $routeName);
    }
public function seeInCurrentRoute($routeName)
    {
        $router = $this->grabService('router');
        if (!$router->getRouteCollection()->get($routeName)) {
            $this->fail(sprintf('Route with name "%s" does not exists.', $routeName));
        }

        $uri = explode('?', $this->grabFromCurrentUrl())[0];
        try {
            $matchedRouteName = $router->match($uri)['_route'];
        } catch (\Symfony\Component\Routing\Exception\ResourceNotFoundException $e) {
            $this->fail(sprintf('The "%s" url does not match with any route', $uri));
        }

        $this->assertEquals($matchedRouteName, $routeName);
    }
public function seeInCurrentRoute ( $ routeName ) { $ router = $ this -> grabService ( 'router' ) ; if ( ! $ router -> getRouteCollection ( ) -> get ( $ routeName ) ) { $ this -> fail ( sprintf ( 'Route with name "%s" does not exists.' , $ routeName ) ) ; } $ uri = explode ( '?' , $ this -> grabFromCurrentUrl ( ) ) [ 0 ] ; try { $ matchedRouteName = $ router -> match ( $ uri ) [ '_route' ] ; } catch ( \ Symfony \ Component \ Routing \ Exception \ ResourceNotFoundException $ e ) { $ this -> fail ( sprintf ( 'The "%s" url does not match with any route' , $ uri ) ) ; } $ this -> assertEquals ( $ matchedRouteName , $ routeName ) ; }
Checks that current url matches route.
Unlike seeCurrentRouteIs, this can matches without exact route parameters

``` php
<?php
$I->seeCurrentRouteMatches('my_blog_pages');
?>
```

@param $routeName
Checks that current url matches route . Unlike seeCurrentRouteIs this can matches without exact route parameters