PHP Класс 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.
Автор: Gunnar Wrobel ([email protected])
Наследование: extends PHPUnit_Extensions_Story_TestCase
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$added array Uid of added objects. Should be removed on tearDown.

Защищенные свойства (Protected)

Свойство Тип Описание
$_environments array The environments we provide to the test.

Открытые методы

Метод Описание
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 ( )

Защищенные методы

Метод Описание
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.

Описание методов

addBasicUsersToServer() публичный Метод

Fill a Kolab Server with test users.
public addBasicUsersToServer ( Horde_Kolab_Server $server ) : null
$server Horde_Kolab_Server The server to fill.
Результат null

addToServer() публичный Метод

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.
Результат Horde_Kolab_Server_Object The resulting object.

addToServers() публичный Метод

Add an object to the registered servers.
public addToServers ( array $object ) : array
$object array The object data to store.
Результат array An array of objects.

assertAdd() защищенный Метод

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.
Результат NULL.

assertEasyAttributes() публичный Метод

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
Результат null

assertError() публичный Метод

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.
Результат NULL.

assertNoError() публичный Метод

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.
Результат NULL.

assertRecursiveType() публичный Метод

public assertRecursiveType ( $results, $type )

assertSimpleAttributes() публичный Метод

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
Результат null

assertSimpleSequence() защищенный Метод

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.
Результат NULL.

assertStoreFetch() защищенный Метод

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.
Результат NULL.

fetchByCn() защищенный Метод

protected fetchByCn ( $server, $cn )

getEnvironments() публичный Метод

Identify the environments we want to run our tests in.
public getEnvironments ( ) : array
Результат array The selected environments.

getKolabMockServer() публичный Метод

Shortcut to get a Kolab mock server.
public getKolabMockServer ( ) : Horde_Kolab_Server
Результат Horde_Kolab_Server The server.

getKolabServer() публичный Метод

Get a server from a specific environment.
public getKolabServer ( string $environment ) : Horde_Kolab_Server
$environment string The name of the environment.
Результат Horde_Kolab_Server The server.

getKolabServers() публичный Метод

Retrieves the available servers. This assumes all environments have been initialied.
public getKolabServers ( ) : array
Результат array The list of test servers.

groupLists() публичный Метод

Provide a set of valid groups.
public groupLists ( ) : array
Результат array The array of groups.

initializeEnvironment() публичный Метод

Initialize the given environment.
public initializeEnvironment ( string $environment ) : null
$environment string The name of the environment.
Результат null

initializeEnvironments() публичный Метод

Initialize the environments.
public initializeEnvironments ( ) : null
Результат null

invalidMails() публичный Метод

public invalidMails ( )

largeList() публичный Метод

public largeList ( )

listObjectsOnServer() публичный Метод

List objects on the registered servers.
public listObjectsOnServer ( array $type ) : array
$type array The type of objects to list.
Результат array An array of objects.

prepareInjector() публичный Метод

Prepare an injector for the given environment.
public prepareInjector ( string $environment ) : null
$environment string The name of the environment.
Результат null

prepareKolabServer() публичный Метод

Prepare the server for the given environment.
public prepareKolabServer ( string $environment ) : null
$environment string The name of the environment.
Результат null

prepareKolabServerConfiguration() публичный Метод

Prepare the server configuration for the given environment.
public prepareKolabServerConfiguration ( string $environment ) : null
$environment string The name of the environment.
Результат null

prepareLogger() публичный Метод

Prepare the log handler for the given environment.
public prepareLogger ( string $environment ) : null
$environment string The name of the environment.
Результат null

provideBasicAddress() публичный Метод

Return a test address.
public provideBasicAddress ( ) : array
Результат array The test address.

provideBasicAdmin() публичный Метод

Return a test administrator.
public provideBasicAdmin ( ) : array
Результат array The test administrator.

provideBasicDomainMaintainer() публичный Метод

Return a test domain maintainer.
public provideBasicDomainMaintainer ( ) : array
Результат array The test domain maintainer.

provideBasicGroupOne() публичный Метод

Return a test group.
public provideBasicGroupOne ( ) : array
Результат array The test group.

provideBasicGroupTwo() публичный Метод

Return a test group.
public provideBasicGroupTwo ( ) : array
Результат array The test group.

provideBasicMaintainer() публичный Метод

Return a test maintainer.
public provideBasicMaintainer ( ) : array
Результат array The test maintainer.

provideBasicSharedFolder() публичный Метод

Return a test shared folder.
public provideBasicSharedFolder ( ) : array
Результат array The test shared folder.

provideBasicUserOne() публичный Метод

Return a test user.
public provideBasicUserOne ( ) : array
Результат array The test user.

provideBasicUserTwo() публичный Метод

Return a test user.
public provideBasicUserTwo ( ) : array
Результат array The test user.

provideDistributionList() публичный Метод

provideGroupWithoutMembers() публичный Метод

Return a test group.
public provideGroupWithoutMembers ( ) : array
Результат array The test group.

provideInvalidUserWithoutGivenName() публичный Метод

provideInvalidUserWithoutLastName() публичный Метод

provideInvalidUserWithoutMail() публичный Метод

provideInvalidUserWithoutPassword() публичный Метод

provideInvalidUsers() публичный Метод

public provideInvalidUsers ( )

runGiven() публичный Метод

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.
Результат mixed The outcome of the step.

runThen() публичный Метод

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.
Результат mixed The outcome of the step.

runWhen() публичный Метод

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.
Результат mixed The outcome of the step.

setEnvironments() публичный Метод

Specifically set the environments we wish to support.
public setEnvironments ( array $environments ) : null
$environments array The selected environments.
Результат null

setUp() защищенный Метод

Setup function.
protected setUp ( ) : NULL.
Результат NULL.

tearDown() защищенный Метод

Cleanup function.
protected tearDown ( ) : NULL.
Результат NULL.

userAdd() публичный Метод

public userAdd ( )

userListByAttribute() публичный Метод

public userListByAttribute ( )

userListByLetter() публичный Метод

public userListByLetter ( )

userLists() публичный Метод

public userLists ( )

validAddresses() публичный Метод

public validAddresses ( )

validAdmins() публичный Метод

public validAdmins ( )

validDomainMaintainers() публичный Метод

validGroups() публичный Метод

Provide a set of valid groups.
public validGroups ( ) : array
Результат array The array of groups.

validMaintainers() публичный Метод

public validMaintainers ( )

validSharedFolders() публичный Метод

public validSharedFolders ( )

validUsers() публичный Метод

public validUsers ( )

Описание свойств

$_environments защищенное свойство

The environments we provide to the test.
protected array $_environments
Результат array

$added публичное свойство

Uid of added objects. Should be removed on tearDown.
public array $added
Результат array