VersionsTest
extends TestCase
in package
Uses
TranslatorTrait
Versions Test Class
Tags
Table of Contents
- isActiveProvider() : array<string|int, mixed>
- Data provider for testIsActive.
- testGetDescription() : void
- Test getting Description.
- testisActive() : void
- Test if the tab is active.
- getMockConfig() : Config
- Build a mock Config.
- getMockPluginManager() : PluginManager
- Build a mock plugin manager.
- getMockTranslator() : TranslatorInterface
- Get mock translator.
Methods
isActiveProvider()
Data provider for testIsActive.
public
static isActiveProvider() : array<string|int, mixed>
Return values
array<string|int, mixed> —testGetDescription()
Test getting Description.
public
testGetDescription() : void
Return values
void —testisActive()
Test if the tab is active.
public
testisActive(bool $versionAction, int $versionCount, bool $expectedResult) : void
Parameters
- $versionAction : bool
-
Action from Plugin
- $versionCount : int
-
Version count from Record Driver
- $expectedResult : bool
-
Expected return value from isActive
Tags
Return values
void —getMockConfig()
Build a mock Config.
protected
getMockConfig() : Config
Return values
Config —getMockPluginManager()
Build a mock plugin manager.
protected
getMockPluginManager() : PluginManager
Return values
PluginManager —getMockTranslator()
Get mock translator.
protected
getMockTranslator(array<string|int, mixed> $translations[, string $locale = 'en' ]) : TranslatorInterface
Parameters
- $translations : array<string|int, mixed>
-
Key => value translation map.
- $locale : string = 'en'
-
Locale, default to 'en'