DNADesign\Elemental\Tests\TopPage\TopPageTest
Synopsis
class TopPageTest
extends SapphireTest
{
- // members
- protected static string $fixture_file = 'TopPageTest.yml';
- protected static array $required_extensions = ;
- protected static array $extra_dataobjects = ;
- // methods
- public void testTestGetTopPage()
- public void testTestUpdateTopPageEmptyCache()
- public void testNewPage()
- public void testNewBlock()
- public void testPageDuplication()
- public void objectsProvider()
- public void populateTopPageProvider()
- public void fixedPagesProvider()
- private void populateTopPageForAllObjects()
Hierarchy
Extends
- SilverStripe\Dev\SapphireTest
Members
protected
- $extra_dataobjects — array
- $fixture_file — string
- $required_extensions — array
Methods
private
public
- fixedPagesProvider()
- objectsProvider()
- populateTopPageProvider()
- testNewBlock()
- testNewPage()
- testPageDuplication() — This test is checking for page duplication in two cases Case 1: standard duplication Case 2: duplication with a fixed page setting The seconds case shows that it's possible to use the withFixedTopPage to set the top page to arbitrary value and completely bypass page determination logic This is needed in some edge cases were automatic determination is not possible due to the object not being assigned to the parent object at the time of duplication but rather later
- testTestGetTopPage()
- testTestUpdateTopPageEmptyCache()