\DMSDocumentTest
Synopsis
class DMSDocumentTest
extends SapphireTest
{
- // members
- protected static string $fixture_file = 'dmstest.yml';
- // methods
- public void testDefaultDownloadBehabiourCMSFields()
- public void testRelatedDocuments()
- public void testGetRelatedDocumentsIsExtensible()
- public void testDocumentHasCmsFieldForManagingRelatedDocuments()
- public void testDocumentHasNoCMSFieldsForManagingRelatedDocumentsIfCantEdit()
- public void testGetRelatedDocumentsForAutocompleter()
- protected GridField getRelatedDocumentsGridField()
- public void testGetActionTaskHtml()
- public void testGetPermissionsActionPanel()
- public void testCanView()
- public void testCanEdit()
- public void testCanDelete()
- public void testCanCreate()
- protected void logoutMember()
- public void testGetPermissionDeniedReason()
- public void testGetRelatedPages()
- public void testGetTitleOrFilenameWithoutId()
- public void testGetStorageFolderThenDelete()
- public void testGetLink()
- public void testGetDescriptionWithLineBreak()
Hierarchy
Extends
- SapphireTest
Members
protected
- $fixture_file
Methods
protected
- getRelatedDocumentsGridField()
- logoutMember() — Logs out any active member
public
- testCanCreate() — Tests create permission
- testCanDelete() — Tests delete permissions
- testCanEdit() — Tests edit permissions
- testCanView() — Test view permissions
- testDefaultDownloadBehabiourCMSFields()
- testDocumentHasCmsFieldForManagingRelatedDocuments() — Ensure that the DMS Document CMS actions contains a grid field for managing related documents
- testDocumentHasNoCMSFieldsForManagingRelatedDocumentsIfCantEdit() — Ensures that the DMS Document CMS Related and Versions fields are removed if user can't edit
- testGetActionTaskHtml() — Ensure that HTML is returned containing list items with action panel steps
- testGetDescriptionWithLineBreak() — Ensure that the description can be returned in HTML format
- testGetLink() — Test that the link contains an ID and URL slug
- testGetPermissionDeniedReason() — Test permission denied reasons for documents
- testGetPermissionsActionPanel()
- testGetRelatedDocumentsForAutocompleter() — Ensure that the related documents list does not include the current document itself
- testGetRelatedDocumentsIsExtensible() — Test the extensibility of getRelatedDocuments
- testGetRelatedPages() — Ensure that all pages that a document belongs to (via many document sets) can be retrieved in one list
- testGetStorageFolderThenDelete() — Ensure that the folder a document's file is stored in can be retrieved, and that delete() will also delete the file and the record
- testGetTitleOrFilenameWithoutId() — Test that the title is returned if it is set, otherwise the filename without ID
- testRelatedDocuments() — Ensure that related documents can be retrieved for a given DMS document