SilverLeague\LogViewer\Tests\Model\LogEntryTest
- Author: Robbie Averill <robbie@averill.co.nz>
Synopsis
class LogEntryTest
extends SapphireTest
{
- // methods
- public void testProvidePermissions()
- public void testAllowCreate()
- public void testAllowEditing()
- public void testAllowView()
- public void testAllowDelete()
- public void testLogEntriesAreFormattedAsJson()
Hierarchy
Extends
- SilverStripe\Dev\SapphireTest
Methods
public
- testAllowCreate() — There's no reason to manually create, so don't allow manual creation
- testAllowDelete() — We can Delete if we're logged in as admin. Otherwise, no.
- testAllowEditing() — Test that LogEntry classes can not be edited
- testAllowView() — We can view if we're logged in as admin. Otherwise, no.
- testLogEntriesAreFormattedAsJson() — Ensure that the contents are JSON encoded and pretty printed, and that the CSS class is correct
- testProvidePermissions() — Test if the Permissions are an array and contain the view and delete permissions