PHP Class Horde_Kolab_Server_Integration_Scenario, horde

Copyright 2008-2016 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.
Inheritance: extends PHPUnit_Extensions_Story_TestCase
Afficher le fichier Open project: horde/horde Class Usage Examples

Méthodes publiques

Свойство Type Description
$added array Uid of added objects. Should be removed on tearDown.

Protected Properties

Свойство Type Description
$_environments array The environments we provide to the test.

Méthodes publiques

Méthode Description
addBasicUsersToServer ( Horde_Kolab_Server $server ) : null Fill a Kolab Server with test users.
addToServer ( Horde_Kolab_Server $server, array $object ) : Horde_Kolab_Server_Object Add an object to a server and remember it for the tear down method.
addToServers ( array $object ) : array Add an object to the registered servers.
assertEasyAttributes ( Horde_Kolab_Server_Object $object, Horde_Kolab_Server $server, array $list ) : null Test easy attributes.
assertError ( mixed $var, string $msg = null ) : NULL. Ensure that the variable contains a Horde_Kolab_Server_Exception and fail if it does not. Optionally compare the error message with the provided message and fail if both do not match.
assertNoError ( mixed $var ) : NULL. Ensure that the variable contains no Horde_Kolab_Server_Exception and fail if it does.
assertRecursiveType ( $results, $type )
assertSimpleAttributes ( Horde_Kolab_Server_Object $object, Horde_Kolab_Server $server, array $list ) : null Test simple attributes.
getEnvironments ( ) : array Identify the environments we want to run our tests in.
getKolabMockServer ( ) : Horde_Kolab_Server Shortcut to get a Kolab mock server.
getKolabServer ( string $environment ) : Horde_Kolab_Server Get a server from a specific environment.
getKolabServers ( ) : array Retrieves the available servers. This assumes all environments have been initialied.
groupLists ( ) : array Provide a set of valid groups.
initializeEnvironment ( string $environment ) : null Initialize the given environment.
initializeEnvironments ( ) : null Initialize the environments.
invalidMails ( )
largeList ( )
listObjectsOnServer ( array $type ) : array List objects on the registered servers.
prepareInjector ( string $environment ) : null Prepare an injector for the given environment.
prepareKolabServer ( string $environment ) : null Prepare the server for the given environment.
prepareKolabServerConfiguration ( string $environment ) : null Prepare the server configuration for the given environment.
prepareLogger ( string $environment ) : null Prepare the log handler for the given environment.
provideBasicAddress ( ) : array Return a test address.
provideBasicAdmin ( ) : array Return a test administrator.
provideBasicDomainMaintainer ( ) : array Return a test domain maintainer.
provideBasicGroupOne ( ) : array Return a test group.
provideBasicGroupTwo ( ) : array Return a test group.
provideBasicMaintainer ( ) : array Return a test maintainer.
provideBasicSharedFolder ( ) : array Return a test shared folder.
provideBasicUserOne ( ) : array Return a test user.
provideBasicUserTwo ( ) : array Return a test user.
provideDistributionList ( )
provideGroupWithoutMembers ( ) : array Return a test group.
provideInvalidUserWithoutGivenName ( )
provideInvalidUserWithoutLastName ( )
provideInvalidUserWithoutMail ( )
provideInvalidUserWithoutPassword ( )
provideInvalidUsers ( )
runGiven ( &$world, string $action, array $arguments ) : mixed Handle a "given" step.
runThen ( &$world, string $action, array $arguments ) : mixed Handle a "then" step.
runWhen ( &$world, string $action, array $arguments ) : mixed Handle a "when" step.
setEnvironments ( array $environments ) : null Specifically set the environments we wish to support.
userAdd ( )
userListByAttribute ( )
userListByLetter ( )
userLists ( )
validAddresses ( )
validAdmins ( )
validDomainMaintainers ( )
validGroups ( ) : array Provide a set of valid groups.
validMaintainers ( )
validSharedFolders ( )
validUsers ( )

Méthodes protégées

Méthode Description
assertAdd ( Horde_Kolab_Server $server, array $store, array $fetch ) : NULL. Assert that creating a new object operation yields some predictable attribute results.
assertSimpleSequence ( Horde_Kolab_Server_Object $object, Horde_Kolab_Server $server, string $attribute, array $sequence, $pop_arrays = false ) : NULL. Assert that a save() operation yields some predictable attribute results.
assertStoreFetch ( Horde_Kolab_Server_Object $object, Horde_Kolab_Server $server, array $store, array $fetch, $pop_arrays = false ) : NULL. Assert that a save() operation yields some predictable attribute results.
fetchByCn ( $server, $cn )
setUp ( ) : NULL. Setup function.
tearDown ( ) : NULL. Cleanup function.

Method Details

addBasicUsersToServer() public méthode

Fill a Kolab Server with test users.
public addBasicUsersToServer ( Horde_Kolab_Server $server ) : null
$server Horde_Kolab_Server The server to fill.
Résultat null

addToServer() public méthode

Add an object to a server and remember it for the tear down method.
public addToServer ( Horde_Kolab_Server $server, array $object ) : Horde_Kolab_Server_Object
$server Horde_Kolab_Server The server to add the object to.
$object array The object data to store.
Résultat Horde_Kolab_Server_Object The resulting object.

addToServers() public méthode

Add an object to the registered servers.
public addToServers ( array $object ) : array
$object array The object data to store.
Résultat array An array of objects.

assertAdd() protected méthode

Assert that creating a new object operation yields some predictable attribute results.
protected assertAdd ( Horde_Kolab_Server $server, array $store, array $fetch ) : NULL.
$server Horde_Kolab_Server The server the object resides on.
$store array The information to save.
$fetch array The expected results.
Résultat NULL.

assertEasyAttributes() public méthode

Test easy attributes.
public assertEasyAttributes ( Horde_Kolab_Server_Object $object, Horde_Kolab_Server $server, array $list ) : null
$object Horde_Kolab_Server_Object
$server Horde_Kolab_Server
$list array
Résultat null

assertError() public méthode

Ensure that the variable contains a Horde_Kolab_Server_Exception and fail if it does not. Optionally compare the error message with the provided message and fail if both do not match.
public assertError ( mixed $var, string $msg = null ) : NULL.
$var mixed The variable to check.
$msg string The expected error message.
Résultat NULL.

assertNoError() public méthode

Ensure that the variable contains no Horde_Kolab_Server_Exception and fail if it does.
public assertNoError ( mixed $var ) : NULL.
$var mixed The variable to check.
Résultat NULL.

assertRecursiveType() public méthode

public assertRecursiveType ( $results, $type )

assertSimpleAttributes() public méthode

Test simple attributes.
public assertSimpleAttributes ( Horde_Kolab_Server_Object $object, Horde_Kolab_Server $server, array $list ) : null
$object Horde_Kolab_Server_Object
$server Horde_Kolab_Server
$list array
Résultat null

assertSimpleSequence() protected méthode

Assert that a save() operation yields some predictable attribute results.
protected assertSimpleSequence ( Horde_Kolab_Server_Object $object, Horde_Kolab_Server $server, string $attribute, array $sequence, $pop_arrays = false ) : NULL.
$object Horde_Kolab_Server_Object The object to work on.
$server Horde_Kolab_Server The server the object resides on.
$attribute string The attribute to work on.
$sequence array The sequence of values to set and expect.
Résultat NULL.

assertStoreFetch() protected méthode

Assert that a save() operation yields some predictable attribute results.
protected assertStoreFetch ( Horde_Kolab_Server_Object $object, Horde_Kolab_Server $server, array $store, array $fetch, $pop_arrays = false ) : NULL.
$object Horde_Kolab_Server_Object The object to work on.
$server Horde_Kolab_Server The server the object resides on.
$store array The information to save.
$fetch array The expected results.
Résultat NULL.

fetchByCn() protected méthode

protected fetchByCn ( $server, $cn )

getEnvironments() public méthode

Identify the environments we want to run our tests in.
public getEnvironments ( ) : array
Résultat array The selected environments.

getKolabMockServer() public méthode

Shortcut to get a Kolab mock server.
public getKolabMockServer ( ) : Horde_Kolab_Server
Résultat Horde_Kolab_Server The server.

getKolabServer() public méthode

Get a server from a specific environment.
public getKolabServer ( string $environment ) : Horde_Kolab_Server
$environment string The name of the environment.
Résultat Horde_Kolab_Server The server.

getKolabServers() public méthode

Retrieves the available servers. This assumes all environments have been initialied.
public getKolabServers ( ) : array
Résultat array The list of test servers.

groupLists() public méthode

Provide a set of valid groups.
public groupLists ( ) : array
Résultat array The array of groups.

initializeEnvironment() public méthode

Initialize the given environment.
public initializeEnvironment ( string $environment ) : null
$environment string The name of the environment.
Résultat null

initializeEnvironments() public méthode

Initialize the environments.
public initializeEnvironments ( ) : null
Résultat null

invalidMails() public méthode

public invalidMails ( )

largeList() public méthode

public largeList ( )

listObjectsOnServer() public méthode

List objects on the registered servers.
public listObjectsOnServer ( array $type ) : array
$type array The type of objects to list.
Résultat array An array of objects.

prepareInjector() public méthode

Prepare an injector for the given environment.
public prepareInjector ( string $environment ) : null
$environment string The name of the environment.
Résultat null

prepareKolabServer() public méthode

Prepare the server for the given environment.
public prepareKolabServer ( string $environment ) : null
$environment string The name of the environment.
Résultat null

prepareKolabServerConfiguration() public méthode

Prepare the server configuration for the given environment.
public prepareKolabServerConfiguration ( string $environment ) : null
$environment string The name of the environment.
Résultat null

prepareLogger() public méthode

Prepare the log handler for the given environment.
public prepareLogger ( string $environment ) : null
$environment string The name of the environment.
Résultat null

provideBasicAddress() public méthode

Return a test address.
public provideBasicAddress ( ) : array
Résultat array The test address.

provideBasicAdmin() public méthode

Return a test administrator.
public provideBasicAdmin ( ) : array
Résultat array The test administrator.

provideBasicDomainMaintainer() public méthode

Return a test domain maintainer.
public provideBasicDomainMaintainer ( ) : array
Résultat array The test domain maintainer.

provideBasicGroupOne() public méthode

Return a test group.
public provideBasicGroupOne ( ) : array
Résultat array The test group.

provideBasicGroupTwo() public méthode

Return a test group.
public provideBasicGroupTwo ( ) : array
Résultat array The test group.

provideBasicMaintainer() public méthode

Return a test maintainer.
public provideBasicMaintainer ( ) : array
Résultat array The test maintainer.

provideBasicSharedFolder() public méthode

Return a test shared folder.
public provideBasicSharedFolder ( ) : array
Résultat array The test shared folder.

provideBasicUserOne() public méthode

Return a test user.
public provideBasicUserOne ( ) : array
Résultat array The test user.

provideBasicUserTwo() public méthode

Return a test user.
public provideBasicUserTwo ( ) : array
Résultat array The test user.

provideDistributionList() public méthode

provideGroupWithoutMembers() public méthode

Return a test group.
public provideGroupWithoutMembers ( ) : array
Résultat array The test group.

provideInvalidUserWithoutGivenName() public méthode

provideInvalidUserWithoutLastName() public méthode

provideInvalidUserWithoutMail() public méthode

provideInvalidUserWithoutPassword() public méthode

provideInvalidUsers() public méthode

public provideInvalidUsers ( )

runGiven() public méthode

Handle a "given" step.
public runGiven ( &$world, string $action, array $arguments ) : mixed
$action string The description of the step.
$arguments array Additional arguments to the step.
Résultat mixed The outcome of the step.

runThen() public méthode

Handle a "then" step.
public runThen ( &$world, string $action, array $arguments ) : mixed
$action string The description of the step.
$arguments array Additional arguments to the step.
Résultat mixed The outcome of the step.

runWhen() public méthode

Handle a "when" step.
public runWhen ( &$world, string $action, array $arguments ) : mixed
$action string The description of the step.
$arguments array Additional arguments to the step.
Résultat mixed The outcome of the step.

setEnvironments() public méthode

Specifically set the environments we wish to support.
public setEnvironments ( array $environments ) : null
$environments array The selected environments.
Résultat null

setUp() protected méthode

Setup function.
protected setUp ( ) : NULL.
Résultat NULL.

tearDown() protected méthode

Cleanup function.
protected tearDown ( ) : NULL.
Résultat NULL.

userAdd() public méthode

public userAdd ( )

userListByAttribute() public méthode

public userListByAttribute ( )

userListByLetter() public méthode

public userListByLetter ( )

userLists() public méthode

public userLists ( )

validAddresses() public méthode

public validAddresses ( )

validAdmins() public méthode

public validAdmins ( )

validDomainMaintainers() public méthode

validGroups() public méthode

Provide a set of valid groups.
public validGroups ( ) : array
Résultat array The array of groups.

validMaintainers() public méthode

public validMaintainers ( )

validSharedFolders() public méthode

public validSharedFolders ( )

validUsers() public méthode

public validUsers ( )

Property Details

$_environments protected_oe property

The environments we provide to the test.
protected array $_environments
Résultat array

$added public_oe property

Uid of added objects. Should be removed on tearDown.
public array $added
Résultat array