Code Duplication    Length = 10-15 lines in 3 locations

spec/Service/UriGenerator/Transformer/RouterPathTransformerSpec.php 3 locations

@@ 70-80 (lines=11) @@
67
        $this->transform('about')->shouldBeAnUriWithPath('/pages/about');
68
    }
69
70
    function it_accepts_query_params_in_options(
71
        ServerRequestInterface $request,
72
        RouterContainer $router,
73
        Generator $generator
74
    )
75
    {
76
        $this->prepareTest($request, $router, $generator);
77
78
        $this->transform('about', ['query' => ['foo' => 'bar']])
79
            ->shouldBeAnUriWithPath('/pages/about?foo=bar');
80
    }
81
82
    function it_can_reuse_host_name_from_context_request(
83
        ServerRequestInterface $request,
@@ 82-91 (lines=10) @@
79
            ->shouldBeAnUriWithPath('/pages/about?foo=bar');
80
    }
81
82
    function it_can_reuse_host_name_from_context_request(
83
        ServerRequestInterface $request,
84
        RouterContainer $router,
85
        Generator $generator
86
    )
87
    {
88
        $this->prepareTest($request, $router, $generator);
89
        $this->transform('about', ['reuseHostName' => 1])
90
            ->shouldBeAnUriWithPath('https://localhost:12541/pages/about');
91
    }
92
93
    function it_can_reuse_the_request_query_params(
94
        ServerRequestInterface $request,
@@ 93-107 (lines=15) @@
90
            ->shouldBeAnUriWithPath('https://localhost:12541/pages/about');
91
    }
92
93
    function it_can_reuse_the_request_query_params(
94
        ServerRequestInterface $request,
95
        RouterContainer $router,
96
        Generator $generator
97
    )
98
    {
99
        $this->prepareTest($request, $router, $generator);
100
        $this->transform('about', [
101
            'reuseParams' => 1,
102
            'query' => ['foo' => 'bar']
103
        ])
104
            ->shouldBeAnUriWithPath(
105
                '/pages/about?foo=bar&baz=bar'
106
            );
107
    }
108
109
    /**
110
     * Prepares the test