Code Duplication    Length = 9-10 lines in 2 locations

tests/php/SiteTreeSubsitesTest.php 2 locations

@@ 350-359 (lines=10) @@
347
        $this->assertEquals('important-page', $mainSubsiteImportantPage->URLSegment);
348
    }
349
350
    public function testCopySubsiteWithChildren()
351
    {
352
        $page = $this->objFromFixture('Page', 'about');
353
        $newSubsite = $this->objFromFixture(Subsite::class, 'subsite1');
354
355
        $moved = $page->duplicateToSubsite($newSubsite->ID, true);
356
        $this->assertEquals($moved->SubsiteID, $newSubsite->ID, 'Ensure returned records are on new subsite');
357
        $this->assertEquals(
358
            $moved->AllChildren()->count(),
359
            $page->AllChildren()->count(),
360
            'All pages are copied across'
361
        );
362
    }
@@ 364-372 (lines=9) @@
361
        );
362
    }
363
364
    public function testCopySubsiteWithoutChildren()
365
    {
366
        $page = $this->objFromFixture('Page', 'about');
367
        $newSubsite = $this->objFromFixture(Subsite::class, 'subsite2');
368
369
        $moved = $page->duplicateToSubsite($newSubsite->ID, false);
370
        $this->assertEquals($moved->SubsiteID, $newSubsite->ID, 'Ensure returned records are on new subsite');
371
        $this->assertEquals($moved->AllChildren()->count(), 0, 'All pages are copied across');
372
    }
373
374
    public function testIfSubsiteThemeIsSetToThemeList()
375
    {