Code Duplication    Length = 12-12 lines in 4 locations

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

@@ 321-332 (lines=12) @@
318
        }
319
    }
320
321
    public function testSerialize()
322
    {
323
        $matcher = new LogicalAnd([]);
324
        $matcher->setRequest(new SimplifiedRequest(['pathinfo' => '/foo/bar']));
325
        $sa = new SiteAccess('test', 'test', $matcher);
326
        $serializedSA1 = serialize($sa);
327
328
        $matcher->setRequest(new SimplifiedRequest(['pathinfo' => '/foo/bar/baz']));
329
        $serializedSA2 = serialize($sa);
330
331
        $this->assertSame($serializedSA1, $serializedSA2);
332
    }
333
}
334

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

@@ 329-340 (lines=12) @@
326
        }
327
    }
328
329
    public function testSerialize()
330
    {
331
        $matcher = new LogicalOr([]);
332
        $matcher->setRequest(new SimplifiedRequest(['pathinfo' => '/foo/bar']));
333
        $sa = new SiteAccess('test', 'test', $matcher);
334
        $serializedSA1 = serialize($sa);
335
336
        $matcher->setRequest(new SimplifiedRequest(['pathinfo' => '/foo/bar/baz']));
337
        $serializedSA2 = serialize($sa);
338
339
        $this->assertSame($serializedSA1, $serializedSA2);
340
    }
341
}
342

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

@@ 226-237 (lines=12) @@
223
        $this->assertNull($matcher->reverseMatch('another_siteaccess_again_dont_tell_me'));
224
    }
225
226
    public function testSerialize()
227
    {
228
        $matcher = new URIElementMatcher([2]);
229
        $matcher->setRequest(new SimplifiedRequest(['pathinfo' => '/foo/bar']));
230
        $sa = new SiteAccess('test', 'test', $matcher);
231
        $serializedSA1 = serialize($sa);
232
233
        $matcher->setRequest(new SimplifiedRequest(['pathinfo' => '/foo/bar/baz']));
234
        $serializedSA2 = serialize($sa);
235
236
        $this->assertSame($serializedSA1, $serializedSA2);
237
    }
238
239
    private function createRouter(): Router
240
    {

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

@@ 196-207 (lines=12) @@
193
        ];
194
    }
195
196
    public function testSerialize()
197
    {
198
        $matcher = new URIElementMatcher([1]);
199
        $matcher->setRequest(new SimplifiedRequest(['pathinfo' => '/foo/bar']));
200
        $sa = new SiteAccess('test', 'test', $matcher);
201
        $serializedSA1 = serialize($sa);
202
203
        $matcher->setRequest(new SimplifiedRequest(['pathinfo' => '/foo/bar/baz']));
204
        $serializedSA2 = serialize($sa);
205
206
        $this->assertSame($serializedSA1, $serializedSA2);
207
    }
208
209
    private function createRouter(): Router
210
    {