Code Duplication    Length = 10-13 lines in 2 locations

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

@@ 5479-5488 (lines=10) @@
5476
5477
        // check reloaded structures
5478
        $urlAliases = $handler->listURLAliasesForLocation($locationId);
5479
        foreach ($urlAliases as $urlAlias) {
5480
            self::assertNotContains($removeLanguage, $urlAlias->languageCodes);
5481
            foreach ($urlAlias->pathData as $pathData) {
5482
                self::assertNotContains($removeLanguage, $pathData['translations']);
5483
                foreach ($pathData['translations'] as $url) {
5484
                    $lookupUrlAlias = $handler->lookup($url);
5485
                    self::assertNotContains($removeLanguage, $lookupUrlAlias->languageCodes);
5486
                }
5487
            }
5488
        }
5489
5490
        // lookup removed URLs to check they're not found
5491
        foreach ($collectedUrls as $url => $isComposite) {
@@ 5491-5503 (lines=13) @@
5488
        }
5489
5490
        // lookup removed URLs to check they're not found
5491
        foreach ($collectedUrls as $url => $isComposite) {
5492
            $urlAlias = $handler->lookup($url);
5493
            if ($isComposite) {
5494
                // check if alias no longer refers to removed Translation
5495
                self::assertNotContains($removeLanguage, $urlAlias->languageCodes);
5496
                foreach ($urlAlias->pathData as $pathData) {
5497
                    self::assertNotContains($removeLanguage, $pathData['translations']);
5498
                }
5499
            } else {
5500
                // check if non composite alias for removed translation is historized
5501
                self::assertTrue($urlAlias->isHistory);
5502
            }
5503
        }
5504
    }
5505
}
5506