mirror of
https://github.com/silverstripe/silverstripe-frameworktest
synced 2024-10-22 11:06:02 +02:00
ENH Stop using deprecated Versioned methods (#121)
This commit is contained in:
parent
2721b8fe75
commit
cd4c310e1f
@ -50,7 +50,7 @@ class TestPage extends Page implements \TestPageInterface
|
||||
$parent = static::getOrCreateParentPage();
|
||||
$page->ParentID = $parent->ID;
|
||||
$page->write();
|
||||
$page->publish('Stage', 'Live');
|
||||
$page->copyVersionToStage('Stage', 'Live');
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -72,7 +72,7 @@ class TestPage extends Page implements \TestPageInterface
|
||||
)
|
||||
);
|
||||
$parent->write();
|
||||
$parent->doPublish();
|
||||
$parent->publishRecursive();
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -21,7 +21,7 @@ class TestRegistryPage extends RegistryPage
|
||||
$page->ParentID = $parent->ID;
|
||||
$page->DataClass = TestRegistryDataObject::class;
|
||||
$page->write();
|
||||
$page->publish('Stage', 'Live');
|
||||
$page->copyVersionToStage('Stage', 'Live');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -82,7 +82,7 @@ class FTPageMakerTask extends BuildTask
|
||||
$page->ParentID = $parentID;
|
||||
$page->Title = "Test page {$fullPrefix}";
|
||||
$page->write();
|
||||
$page->publish('Stage', 'Live');
|
||||
$page->copyVersionToStage('Stage', 'Live');
|
||||
|
||||
echo "Created '$page->Title' ($page->ClassName)\n";
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user