SilverLeague\IDEAnnotator\tests\MockDataObjectAnnotator
Class MockDataObjectAnnotator Overload DataObjectAnnotator to make protected methods testable.
In this way we can just test the generated annotations without actually writing the files.
Synopsis
class MockDataObjectAnnotator
extends DataObjectAnnotator
implements
TestOnly
{
- // Inherited members from DataObjectAnnotator
- protected static array $extension_classes;
- // methods
- public mixed getGeneratedFileContent()
- // Inherited methods from DataObjectAnnotator
- public void __construct()
- protected void setupExtensionClasses()
- protected void setEnabledClasses()
- public static array getExtensionClasses()
- public static void setExtensionClasses()
- public static void pushExtensionClass()
- public static boolean isEnabled()
- public bool annotateModule()
- public array getClassesForModule()
- public bool annotateObject()
- protected void writeFileContent()
- protected mixed getGeneratedFileContent()
Hierarchy
Members
protected
- $extension_classes
—
array
All classes that subclass Object
Methods
public
Inherited from SilverLeague\IDEAnnotator\DataObjectAnnotator
protected
- getGeneratedFileContent() — Return the complete File content with the newly generated DocBlocks
- setEnabledClasses() — Get all annotatable classes from enabled modules
- setupExtensionClasses() — Named `setup` to not clash with the actual setter
- writeFileContent()
public
- annotateModule() — Generate docblock for all subclasses of DataObjects and DataExtenions within a module.
- annotateObject() — Generate docblock for a single subclass of DataObject or DataExtenions
- getClassesForModule()
- getExtensionClasses()
- isEnabled()
- pushExtensionClass() — Add another extension class False checking, because what we get might be uppercase and then lowercase Allowing for duplicates here, to clean up later
- setExtensionClasses()