SebastiaanLuca\Router\Tests\ExtendedRouterTest::testItAddsPreviouslyRegisteredMiddlewareToRoutes PHP Method

testItAddsPreviouslyRegisteredMiddlewareToRoutes() public method

After bootstrapping the service providers, the registered (but not yet applied) middleware should be added to the corresponding routes.
    public function testItAddsPreviouslyRegisteredMiddlewareToRoutes()
    {
        $router = $this->createExtendedRouter();
        $this->setValueOfInternalProperty($router, 'routeMiddleware', ['route1' => ['middleware'], 'route2' => ['middleware'], 'route3' => ['middleware']]);
        $router->shouldReceive('addMiddlewareToRoute')->times(3);
        $router->linkNamedRouteMiddleware();
    }