$_injector
$_injector : \Horde_Injector
The Horde_Injector instance which serves as our service container.
A test helper for generating complex test setups.
Copyright 2011-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.
setup(array $params) : NULL
Add a new set of elements to the service container.
array | $params | All parameters necessary for creating the services. The keys of the array elements define the name that will be used for registering the test service with the injector. The element values are a configuration array with the following elements: 'factory' - (string) Name of the factory. Can be a full class name or an abbreviated name that will get prepended with 'Horde_Test_Factory_' 'method' - (string) Method name that will be invoked on the above factory to generate the test service. 'params' - (array) Any parameters the factory method might require for generating the test service. See the various factories/methods for details. |
add( $interface, string $factory, string $method, array $params) : NULL
Add a new element to the service container.
$interface | ||
string | $factory | The (abbreviated) name of the factory. |
string | $method | The factory method that will generate the service. |
array | $params | All parameters necessary for creating the service. |