class Test

Class Test

A facade for managing the test environment.

Methods

static string|array|NULL
dsn(string|NULL $part = NULL)

Get the data source used for testing.

static PDO
pdo()

Get a connection to the test database.

static CiviEnvBuilder
headless()

Create a builder for the headless environment.

static CiviEnvBuilder
e2e()

Create a builder for end-to-end testing on the live environment.

static Schema
schema()

No description

static Data
data()

No description

static bool
execute(string $query)

Prepare and execute a batch of SQL statements.

Details

at line 28
static string|array|NULL dsn(string|NULL $part = NULL)

Get the data source used for testing.

Parameters

string|NULL $part One of NULL, 'hostspec', 'port', 'username', 'password', 'database'.

Return Value

string|array|NULL If $part is omitted, return full DSN array. If $part is a string, return that part of the DSN.

at line 50
static PDO pdo()

Get a connection to the test database.

Return Value

PDO

at line 79
static CiviEnvBuilder headless()

Create a builder for the headless environment.

Return Value

CiviEnvBuilder

at line 109
static CiviEnvBuilder e2e()

Create a builder for end-to-end testing on the live environment.

Return Value

CiviEnvBuilder

at line 123
static Schema schema()

Return Value

Schema

at line 133
static Data data()

Return Value

Data

at line 146
static bool execute(string $query)

Prepare and execute a batch of SQL statements.

Parameters

string $query

Return Value

bool