Code Duplication    Length = 10-13 lines in 2 locations

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

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