Neos\Flow\Tests\Unit\Mvc\Routing\RouteTest::routeMatchesIfRoutePartDoesNotMatchButIsOptionalAndHasDefault PHP Method

routeMatchesIfRoutePartDoesNotMatchButIsOptionalAndHasDefault() public method

    public function routeMatchesIfRoutePartDoesNotMatchButIsOptionalAndHasDefault()
    {
        $this->route->setUriPattern('({foo})');
        $this->route->setDefaults(['foo' => 'bar']);
        $this->assertTrue($this->routeMatchesPath(''), 'Route should match if optional Route Part has a default value.');
    }
RouteTest