TestUtil.php
76 $numTables = $pdo->query('SELECT count(*) FROM sqlite_master WHERE type = "table"')->fetchColumn();
83 $numTables = $pdo->query('SELECT COUNT(*) FROM information_schema.tables WHERE table_schema = "'.$params['dbName'].'"')->fetchColumn();
98 * @param $killOnExit Boolean, whether to kill the server process after script execution or not (optional, default: false)
105 throw new \RuntimeException("Constant TEST_SERVER not defined, e.g. define(TEST_SERVER, 'localhost:8500')");
MonologFileLogger is a wrapper for the Monolog library that logs to files.
Definition: MonologFileLogger.php:36
InifileConfiguration reads the application configuration from ini files.
Definition: InifileConfiguration.php:30
static startServer($documentRoot, $router='', $killOnExit=false)
Start the built-in webserver that serves the application under test.
Definition: TestUtil.php:100
Implementations of Configuration give access to the application configuration.
Definition: Configuration.php:32
static callProtectedMethod($instance, $methodName, $args=null)
Call a protected/private method of an instance (PHP >= 5.3.2)
Definition: TestUtil.php:211
static getNewInstance($name, $dynamicConfiguration=[])
Definition: ObjectFactory.php:55
static getInstance($name, $dynamicConfiguration=[])
Definition: ObjectFactory.php:47
static createDatabase()
Create the test database, if sqlite is configured.
Definition: TestUtil.php:65
LogManager is used to retrieve Logger instances.
Definition: LogManager.php:20
DefaultFactory is used to create service instances.
Definition: DefaultFactory.php:60
TestUtil provides helper methods for testing wCMF functionality.
Definition: TestUtil.php:25
static simulateRequest($request)
Process a request as if it was sent to main.php.
Definition: TestUtil.php:151
ObjectFactory implements the service locator pattern by wrapping a Factory instance and providing sta...
Definition: ObjectFactory.php:24
static registerInstance($name, $instance)
Definition: ObjectFactory.php:71