\Horde_Test_Case

Basic Horde test case helper.

Copyright 2009-2017 Horde LLC (http://www.horde.org/)

See the enclosed file LICENSE for license information (LGPL). If you did not receive this file, see http://www.horde.org/licenses/lgpl21.

Summary

Methods
Properties
Constants
getMockSkipConstructor()
getConfig()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

getMockSkipConstructor()

getMockSkipConstructor(  $className, array  $methods = array(), array  $arguments = array(),   $mockClassName = '') 

Useful shorthand if you are mocking a class with a private constructor

Parameters

$className
array $methods
array $arguments
$mockClassName

getConfig()

getConfig(string  $env, string  $path = null, array  $default = array()) : mixed

Helper method for loading test configuration from a file.

The configuration can be specified by an environment variable. If the variable content is a file name, the configuration is loaded from the file. Otherwise it's assumed to be a json encoded configuration hash. If the environment variable is not set, the method tries to load a conf.php file from the same directory as the test case.

Parameters

string $env

An environment variable name.

string $path

The path to use.

array $default

Some default values that are merged into the configuration if specified as a json hash.

Returns

mixed —

The value of the configuration file's $conf variable, or null.