Code Duplication    Length = 10-13 lines in 2 locations

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

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