Code Duplication    Length = 10-13 lines in 2 locations

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

@@ 5519-5528 (lines=10) @@
5516
5517
        // check reloaded structures
5518
        $urlAliases = $handler->listURLAliasesForLocation($locationId);
5519
        foreach ($urlAliases as $urlAlias) {
5520
            self::assertNotContains($removeLanguage, $urlAlias->languageCodes);
5521
            foreach ($urlAlias->pathData as $pathData) {
5522
                self::assertNotContains($removeLanguage, $pathData['translations']);
5523
                foreach ($pathData['translations'] as $url) {
5524
                    $lookupUrlAlias = $handler->lookup($url);
5525
                    self::assertNotContains($removeLanguage, $lookupUrlAlias->languageCodes);
5526
                }
5527
            }
5528
        }
5529
5530
        // lookup removed URLs to check they're not found
5531
        foreach ($collectedUrls as $url => $isComposite) {
@@ 5531-5543 (lines=13) @@
5528
        }
5529
5530
        // lookup removed URLs to check they're not found
5531
        foreach ($collectedUrls as $url => $isComposite) {
5532
            $urlAlias = $handler->lookup($url);
5533
            if ($isComposite) {
5534
                // check if alias no longer refers to removed Translation
5535
                self::assertNotContains($removeLanguage, $urlAlias->languageCodes);
5536
                foreach ($urlAlias->pathData as $pathData) {
5537
                    self::assertNotContains($removeLanguage, $pathData['translations']);
5538
                }
5539
            } else {
5540
                // check if non composite alias for removed translation is historized
5541
                self::assertTrue($urlAlias->isHistory);
5542
            }
5543
        }
5544
    }
5545
}
5546