Code Duplication    Length = 6-6 lines in 2 locations

tests/behat/src/CmsUiContext.php 2 locations

@@ 316-321 (lines=6) @@
313
        assertNotNull($tabsets, 'CMS tabs not found');
314
315
        $tab_element = null;
316
        foreach ($tabsets as $tabset) {
317
            $tab_element = $tabset->find('named', array('link_or_button', "'$tab'"));
318
            if ($tab_element) {
319
                break;
320
            }
321
        }
322
        if ($negate) {
323
            assertNull($tab_element, sprintf('%s tab found', $tab));
324
        } else {
@@ 344-349 (lines=6) @@
341
        assertNotNull($tabsets, 'CMS tabs not found');
342
343
        $tab_element = null;
344
        foreach ($tabsets as $tabset) {
345
            if ($tab_element) {
346
                continue;
347
            }
348
            $tab_element = $tabset->find('named', array('link_or_button', "'$tab'"));
349
        }
350
        assertNotNull($tab_element, sprintf('%s tab not found', $tab));
351
352
        $tab_element->click();