Code Duplication    Length = 28-28 lines in 3 locations

eZ/Publish/Core/MVC/Symfony/SiteAccess/Tests/RouterHostPortURITest.php 1 location

@@ 211-238 (lines=28) @@
208
        $this->assertSame('http', $result->getRequest()->scheme);
209
    }
210
211
    private function createRouter(): Router
212
    {
213
        return new Router(
214
            $this->matcherBuilder,
215
            $this->createMock(LoggerInterface::class),
216
            'default_sa',
217
            [
218
                'Map\\Host' => [
219
                    'first_sa' => 'first_sa',
220
                    'first_siteaccess' => 'first_sa',
221
                    'third_siteaccess' => 'third_sa',
222
                ],
223
                'Map\\Port' => [
224
                    80 => 'fifth_sa',
225
                    81 => 'third_sa',
226
                    82 => 'fourth_sa',
227
                    83 => 'first_sa',
228
                    85 => 'first_sa',
229
                    443 => 'fourth_sa',
230
                ],
231
                'Map\\URI' => [
232
                    'first_sa' => 'first_sa',
233
                    'second_sa' => 'second_sa',
234
                ],
235
            ],
236
            $this->siteAccessProvider
237
        );
238
    }
239
}
240

eZ/Publish/Core/MVC/Symfony/SiteAccess/Tests/RouterPortHostURITest.php 1 location

@@ 136-163 (lines=28) @@
133
        ];
134
    }
135
136
    private function createRouter(): Router
137
    {
138
        return new Router(
139
            $this->matcherBuilder,
140
            $this->createMock(LoggerInterface::class),
141
            'default_sa',
142
            [
143
                'Map\\Port' => [
144
                    80 => 'fifth_sa',
145
                    81 => 'third_sa',
146
                    82 => 'fourth_sa',
147
                    83 => 'first_sa',
148
                    85 => 'first_sa',
149
                    443 => 'fourth_sa',
150
                ],
151
                'Map\\Host' => [
152
                    'first_sa' => 'first_sa',
153
                    'first_siteaccess' => 'first_sa',
154
                    'third_siteaccess' => 'third_sa',
155
                ],
156
                'Map\\URI' => [
157
                    'first_sa' => 'first_sa',
158
                    'second_sa' => 'second_sa',
159
                ],
160
            ],
161
            $this->siteAccessProvider
162
        );
163
    }
164
}
165

eZ/Publish/Core/MVC/Symfony/SiteAccess/Tests/RouterSpecialPortsTest.php 1 location

@@ 136-163 (lines=28) @@
133
        $this->assertSame('port', $matcher->getName());
134
    }
135
136
    private function createRouter(): Router
137
    {
138
        return new Router(
139
            $this->matcherBuilder,
140
            $this->createMock(LoggerInterface::class),
141
            'default_sa',
142
            [
143
                'Map\\URI' => [
144
                    'first_sa' => 'first_sa',
145
                    'second_sa' => 'second_sa',
146
                ],
147
                'Map\\Host' => [
148
                    'first_sa' => 'first_sa',
149
                    'first_siteaccess' => 'first_sa',
150
                    'third_siteaccess' => 'third_sa',
151
                ],
152
                'Map\\Port' => [
153
                    80 => 'fifth_sa',
154
                    81 => 'third_sa',
155
                    82 => 'fourth_sa',
156
                    83 => 'first_sa',
157
                    85 => 'first_sa',
158
                    443 => 'fourth_sa',
159
                ],
160
            ],
161
            $this->siteAccessProvider
162
        );
163
    }
164
}
165