Code Duplication    Length = 10-13 lines in 2 locations

eZ/Publish/Core/Persistence/Legacy/Tests/Content/UrlAlias/UrlAliasHandlerTest.php 2 locations

@@ 5540-5549 (lines=10) @@
5537
5538
        // check reloaded structures
5539
        $urlAliases = $handler->listURLAliasesForLocation($locationId);
5540
        foreach ($urlAliases as $urlAlias) {
5541
            self::assertNotContains($removeLanguage, $urlAlias->languageCodes);
5542
            foreach ($urlAlias->pathData as $pathData) {
5543
                self::assertNotContains($removeLanguage, $pathData['translations']);
5544
                foreach ($pathData['translations'] as $url) {
5545
                    $lookupUrlAlias = $handler->lookup($url);
5546
                    self::assertNotContains($removeLanguage, $lookupUrlAlias->languageCodes);
5547
                }
5548
            }
5549
        }
5550
5551
        // lookup removed URLs to check they're not found
5552
        foreach ($collectedUrls as $url => $isComposite) {
@@ 5552-5564 (lines=13) @@
5549
        }
5550
5551
        // lookup removed URLs to check they're not found
5552
        foreach ($collectedUrls as $url => $isComposite) {
5553
            $urlAlias = $handler->lookup($url);
5554
            if ($isComposite) {
5555
                // check if alias no longer refers to removed Translation
5556
                self::assertNotContains($removeLanguage, $urlAlias->languageCodes);
5557
                foreach ($urlAlias->pathData as $pathData) {
5558
                    self::assertNotContains($removeLanguage, $pathData['translations']);
5559
                }
5560
            } else {
5561
                // check if non composite alias for removed translation is historized
5562
                self::assertTrue($urlAlias->isHistory);
5563
            }
5564
        }
5565
    }
5566
}
5567