SilverLeague\IDEAnnotator\Tests\DataObjectAnnotatorTest
Class DataObjectAnnotatorTest
Several tests to make sure the Annotator does it's job correctly
Synopsis
class DataObjectAnnotatorTest
extends SapphireTest
{
- // members
- private MockDataObjectAnnotator $annotator;
- private AnnotatePermissionChecker $permissionChecker;
- // methods
- public void testIsEnabled()
- public void testGetClassesForModule()
- public void testAnnotateObject()
- public void testAnnotateModule()
- public void testFileContentWithAnnotations()
- public void testShortFileContentWithAnnotations()
- public void testInversePlayerRelationOfTeam()
- public void testDefaults()
- public void testSetExtensionClasses()
- public void testShortInversePlayerRelationOfTeam()
- public void testExistingMethodsWillNotBeTagged()
- public void testShortExistingMethodsWillNotBeTagged()
- public void testNothingHasChangedAfterSecondAnnotation()
- public void testRootAnnotations()
- public void testAnnotateDataExtension()
- public void testShortAnnotateDataExtension()
- public void testTwoClassesInOneFile()
- protected void setUp()
Hierarchy
Extends
- SilverStripe\Dev\SapphireTest
Members
private
- $annotator — SilverLeague\IDEAnnotator\Tests\MockDataObjectAnnotator
- $permissionChecker — SilverLeague\IDEAnnotator\Helpers\AnnotatePermissionChecker
Methods
protected
- setUp() — Setup Defaults
public
- testAnnotateDataExtension() — Test the generation of annotations for a DataExtension
- testAnnotateModule() — Not testing existing modules, as it wil actively alter the mock files, so enable mysite
- testAnnotateObject() — As below, as we don't want to actively change the mocks, so enable mysite
- testDefaults()
- testExistingMethodsWillNotBeTagged()
- testFileContentWithAnnotations() — Test if the correct annotations are generated for all database fields, relations and extensions and that the start and end tags are present
- testGetClassesForModule() — Test the expected classes show up in the Classes for Module
- testInversePlayerRelationOfTeam()
- testIsEnabled() — Are we enabled?
- testNothingHasChangedAfterSecondAnnotation() — Test that multiple annotation runs won't generate ducplicate docblocks
- testRootAnnotations() — Test that root (non-namespaced) classes get annotated
- testSetExtensionClasses()
- testShortAnnotateDataExtension() — Test the generation of annotations for a DataExtension
- testShortExistingMethodsWillNotBeTagged()
- testShortFileContentWithAnnotations() — Test if the correct annotations are generated for all database fields, relations and extensions and that the start and end tags are present
- testShortInversePlayerRelationOfTeam()
- testTwoClassesInOneFile()