Overview

Packages

  • Test

Classes

  • Horde_Test_AllTests
  • Horde_Test_Case
  • Horde_Test_Exception
  • Horde_Test_Factory_Alarm
  • Horde_Test_Factory_Cache
  • Horde_Test_Factory_Db
  • Horde_Test_Factory_Group
  • Horde_Test_Factory_History
  • Horde_Test_Factory_KolabStorage
  • Horde_Test_Factory_Perms
  • Horde_Test_Factory_Prefs
  • Horde_Test_Factory_Registry
  • Horde_Test_Factory_Session
  • Horde_Test_Factory_Share
  • Horde_Test_Functional
  • Horde_Test_Log
  • Horde_Test_Setup
  • Horde_Test_Stub_Cli
  • Horde_Test_Stub_Factory
  • Horde_Test_Stub_Parser
  • Horde_Test_Stub_Registry
  • Overview
  • Package
  • Class
  • Tree

Class Horde_Test_Setup

A test helper for generating complex test setups.

Copyright 2011-2012 Horde LLC (http://www.horde.org/)

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

Package: Test
Category: Horde
License: LGPL
Author: Gunnar Wrobel wrobel@pardus.de
Since: Horde_Test 1.2.0
Link: http://www.horde.org/components/Horde_Test
Located at Horde/Test/Setup.php
Methods summary
public
# __construct( )

Constructor.

Constructor.

public null
# setup( array $params )

Add a new set of elements to the service container.

Add a new set of elements to the service container.

Parameters

$params
<p>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:</p> <pre><span class="php-quote">'factory'</span> - (string) Name of the factory. Can be a full <span class="php-keyword1">class</span> name <span class="php-keyword1">or</span> an abbreviated name that will get prepended with <span class="php-quote">'Horde_Test_Factory_'</span> <span class="php-quote">'method'</span> - (string) Method name that will be invoked on the above factory to generate the test service. <span class="php-quote">'params'</span> - (<span class="php-keyword1">array</span>) Any parameters the factory method might <span class="php-keyword1">require</span> <span class="php-keyword1">for</span> generating the test service. See the various factories/methods <span class="php-keyword1">for</span> details.</pre>

Returns

null
public null
# add( string $interface, string $factory, array $method, mixed $params )

Add a new element to the service container.

Add a new element to the service container.

Parameters

$interface
$factory The (abbreviated) name of the factory.
$factory
<p>$method The factory method that will generate the service.</p>
$method
<p>$params All parameters necessary for creating the service.</p>
$params

Returns

null

Oaram

string $interface The interface name to register the service with.
public null
# makeGlobal( array $elements )

Export elements from the injector into global scope.

Export elements from the injector into global scope.

Parameters

$elements
The elements to export.

Returns

null
public string
# getError( )

Return any potential setup error.

Return any potential setup error.

Returns

string
The error.
public Horde_Injector
# getInjector( )

Return the service container.

Return the service container.

Returns

Horde_Injector
The injector.
API documentation generated by ApiGen