PHP Класс DataSift\Storyplayer\DefinitionLib\TestEnvironment_Definition

Автор: Stuart Herbert ([email protected])
Показать файл Открыть проект Примеры использования класса

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

Свойство Тип Описание
$groups array a list of all of the groups of hosts in our test environment
$moduleSettings null | object these settings apply to any host in any group in this environment
$name string the name of this test environment

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

Метод Описание
__construct ( string $name ) create a new test environment definition
getConfig ( ) : DataSift\Stone\ObjectLib\BaseObject what does our definition look like, as a config structure?
getModuleSettings ( ) : null | object get the current module settings for this test environment
getName ( ) : string what is the name of this test environment?
hasModuleSettings ( ) : boolean do we have any module settings?
mergeSystemUnderTestConfig ( $sutConfig ) ------------------------------------------------------------------
newGroup ( integer | string $groupId, Storyplayer\TestEnvironments\GroupAdapter $groupAdapter ) : TestEnvironmentGroup create a new group of hosts
setModuleSettings ( object $newSettings ) tell us the module settings you want to apply to this test environment
setName ( string $name ) set the name of this test environment

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

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

create a new test environment definition
public __construct ( string $name )
$name string the name to assign to this test environment

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

IMPORTANT: we make sure that the data we return is a read-only copy of our definition. At the time of writing, we're not sure if other parts of SPv2 will break as a result.
public getConfig ( ) : DataSift\Stone\ObjectLib\BaseObject
Результат DataSift\Stone\ObjectLib\BaseObject

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

get the current module settings for this test environment
public getModuleSettings ( ) : null | object
Результат null | object

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

what is the name of this test environment?
public getName ( ) : string
Результат string

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

do we have any module settings?
public hasModuleSettings ( ) : boolean
Результат boolean

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

------------------------------------------------------------------
public mergeSystemUnderTestConfig ( $sutConfig )

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

create a new group of hosts
public newGroup ( integer | string $groupId, Storyplayer\TestEnvironments\GroupAdapter $groupAdapter ) : TestEnvironmentGroup
$groupId integer | string the ID of this group
$groupAdapter Storyplayer\TestEnvironments\GroupAdapter the adapter for this group
Результат TestEnvironmentGroup a new and empty group, ready for you to define

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

tell us the module settings you want to apply to this test environment
public setModuleSettings ( object $newSettings )
$newSettings object the settings to apply

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

set the name of this test environment
public setName ( string $name )
$name string the new name for this test environment

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

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

a list of all of the groups of hosts in our test environment
protected array $groups
Результат array

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

these settings apply to any host in any group in this environment
protected null|object $moduleSettings
Результат null | object

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

the name of this test environment
protected string $name
Результат string