Copied!

SetupFactory

SetupFactory.php : 13

A Test Factory is used to setup the infrastructure for a tests, based on a specific repository implementation to test.

Methods

publicgetConfigValue()

SetupFactory.php : 41

Returns a config value for $configKey.

public abstract getConfigValue(string $configKey) : mixed

Parameters

Name Type Default value Description
$configKey string - -
Tags
Throws
Exception

if $configKey could not be found.

publicgetIdManager()

SetupFactory.php : 30

Returns a repository specific ID manager.

public abstract getIdManager() : IdManager

Return values

IdManager

publicgetRepository()

SetupFactory.php : 23

Returns a configured repository for testing.

public abstract getRepository([bool $initializeFromScratch = true ]) : Repository

Parameters

Name Type Default value Description
$initializeFromScratch bool true

if the back end should be initialized from scratch or re-used

Return values

Repository

publicgetServiceContainer()

SetupFactory.php : 50

Returns the service container used for initialization of the repository.

public abstract getServiceContainer() : ServiceContainer

Most tests should not use this at all!!

Return values

ServiceContainer