\DMSDocumentAddControllerTest
Synopsis
class DMSDocumentAddControllerTest
extends FunctionalTest
{
- // members
- protected static string $fixture_file = 'dms/tests/dmstest.yml';
- protected DMSDocumentAddController $controller;
- // methods
- public void setUp()
- public void testCurrentPageReturnsSiteTree()
- public void testGetCurrentDocumentSetReturnsDocumentSet()
- public void testGetAllowedExtensions()
- public void testBacklink()
- public void testDocumentAutocomplete()
Hierarchy
Extends
- FunctionalTest
Members
protected
- $controller — DMSDocumentAddController
- $fixture_file
Methods
public
- setUp()
- testBacklink() — Test that the back link will be the document set that a file is uploaded into if relevant, otherwise the model admin that it was uploaded from
- testCurrentPageReturnsSiteTree() — Ensure that if no ID is provided then a SiteTree singleton is returned (which will not have an ID). If one is provided then it should be loaded from the database via versioning.
- testDocumentAutocomplete() — Test that the document autocomplete endpoint returns JSON, matching on ID, title or filename (case insensitive)
- testGetAllowedExtensions() — Test that extra allowed extensions are merged into the default upload field allowed extensions
- testGetCurrentDocumentSetReturnsDocumentSet() — Ensure that if no "dsid" is given a singleton is returned (which will not have an ID). If one is provided it should be loaded from the database