\DMSDocumentSetTest
Synopsis
class DMSDocumentSetTest
extends SapphireTest
{
- // members
- protected static string $fixture_file = 'dmstest.yml';
- // methods
- public void testGetDocumentsIsExtensible()
- public void testGridFieldShowsWhenSetIsSaved()
- public void testRelations()
- public void testDocumentGridFieldConfig()
- public void testGetDocumentDisplayFields()
- public void testNiceFormattingForManuallyAddedInGridField()
- public void testAddQueryFields()
- public void testQueryBuilderDirectionFieldHasFriendlyLabels()
- public void testShortcodeHandlerKeyFieldExists()
- public void testDocumentsAreOrderable()
- public void testSaveLinkedDocuments()
- public void testExceptionOnNoTitleGiven()
- public void testPageFieldRemovedWhenEditingInPageContext()
- public void testPermissions()
Hierarchy
Extends
- SapphireTest
Members
protected
- $fixture_file
Methods
public
- testAddQueryFields() — Test that query fields can be added to the gridfield
- testDocumentGridFieldConfig() — Test that various components exist in the GridField config. See {@link DMSDocumentSet::getCMSFields} for context.
- testDocumentsAreOrderable() — Ensure that if the module is available, the orderable rows GridField component is added
- testExceptionOnNoTitleGiven() — Tests that an exception is thrown if no title entered for a DMSDocumentSet.
- testGetDocumentDisplayFields() — Ensure that the display fields for the documents GridField can be returned
- testGetDocumentsIsExtensible() — Ensure that getDocuments is extensible
- testGridFieldShowsWhenSetIsSaved() — Test that the GridField for documents isn't shown until you've saved the set
- testNiceFormattingForManuallyAddedInGridField() — Tests to ensure that the callback for formatting ManuallyAdded will return a nice label for the user
- testPageFieldRemovedWhenEditingInPageContext() — Ensure that when editing in a page context that the "page" field is removed, or is labelled "Show on page" otherwise
- testPermissions() — Tests all crud permissions
- testQueryBuilderDirectionFieldHasFriendlyLabels() — Ensure that the "direction" dropdown field has user friendly field labels
- testRelations()
- testSaveLinkedDocuments() — Test that extra documents are added after write
- testShortcodeHandlerKeyFieldExists() — Ensure that the configurable shortcode handler key is a hidden field in the CMS