Kraken\_Unit\Network\Http\Component\Router\HttpRouterTest::testApiAddRoute_ReplacesRoute_WhenRouteDoesExist PHP Метод

testApiAddRoute_ReplacesRoute_WhenRouteDoesExist() публичный Метод

    public function testApiAddRoute_ReplacesRoute_WhenRouteDoesExist()
    {
        $server = $this->createServer();
        $router = $this->createRouter($server);
        $route = '/route';
        $this->assertFalse($router->existsRoute($route));
        $router->addRoute($route, $this->createComponent());
        $router->addRoute($route, $this->createComponent());
        $this->assertTrue($router->existsRoute($route));
    }
HttpRouterTest