Copied!

Legacy

Legacy.php : 33
Extends SetupFactory

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

Properties

protected $db

Legacy.php : 54

Database type (sqlite, mysql, ...).

protected static string $db

protected $dsn

Legacy.php : 40

Data source name.

protected static string $dsn

protected $ioRootDir

Legacy.php : 47

Root dir for IO operations.

protected static string $ioRootDir

protected $repositoryReference

Legacy.php : 84
protected mixed $repositoryReference = 'ibexa.api.repository'

protected $schemaInitialized

Legacy.php : 68

If the DB schema has already been initialized.

protected static bool $schemaInitialized = false

protected $serviceContainer

Legacy.php : 61

Service container.

protected static ServiceContainer $serviceContainer

Methods

public__construct()

Legacy.php : 92

Creates a new setup factory.

public __construct()

publicgetCacheDir()

Legacy.php : 389
public static getCacheDir() : string

Return values

string

Tags
Deprecated

since Ibexa 4.0, rewrite test case to use IbexaKernelTestCase instead.

publicgetConfigValue()

Legacy.php : 175

Returns a config value for $configKey.

public getConfigValue(string $configKey) : mixed

Parameters

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

if $configKey could not be found.

publicgetDB()

Legacy.php : 354

Get the Database name.

public getDB() : string

Return values

string

publicgetIdManager()

Legacy.php : 185

Returns a repository specific ID manager.

public getIdManager() : IdManager

Return values

IdManager

publicgetInstallationDir()

Legacy.php : 380
public static getInstallationDir() : string

Return values

string

Tags
Deprecated

since Ibexa 4.0, rewrite test case to use IbexaKernelTestCase instead.

publicgetRepository()

Legacy.php : 147

Returns a configured repository for testing.

public 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()

Legacy.php : 293

Returns the service container used for initialization of the repository.

public getServiceContainer() : ServiceContainer

Return values

ServiceContainer

publicinsertData()

Legacy.php : 195

Insert the database data.

public insertData() : void
Tags
Throws
DBALException

protectedcleanupVarDir()

Legacy.php : 209
protected cleanupVarDir(mixed $sourceDir) : mixed

Parameters

Name Type Default value Description
$sourceDir mixed - -

protectedclearInternalCaches()

Legacy.php : 224

CLears internal in memory caches after inserting data circumventing the API.

protected clearInternalCaches() : mixed

protectedexternalBuildContainer()

Legacy.php : 344

This is intended to be used from external repository in order to enable container customization.

protected externalBuildContainer(ContainerBuilder $containerBuilder) : mixed

Parameters

Name Type Default value Description
$containerBuilder ContainerBuilder - -

protectedgetInitialDataFixture()

Legacy.php : 245
protected getInitialDataFixture() : Fixture

Return values

Fixture

protectedgetInitialVarDir()

Legacy.php : 204
protected getInitialVarDir() : string

Return values

string

protectedinitializeSchema()

Legacy.php : 261

Initializes the database schema.

protected initializeSchema() : void
Tags
Throws
ConnectionException