PHP Class DataSift\Storyplayer\DefinitionLib\TestEnvironment_Definition

Datei anzeigen Open project: datasift/storyplayer Class Usage Examples

Protected Properties

Property Type Description
$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

Public Methods

Method Description
__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

Method Details

__construct() public method

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

getConfig() public method

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
return DataSift\Stone\ObjectLib\BaseObject

getModuleSettings() public method

get the current module settings for this test environment
public getModuleSettings ( ) : null | object
return null | object

getName() public method

what is the name of this test environment?
public getName ( ) : string
return string

hasModuleSettings() public method

do we have any module settings?
public hasModuleSettings ( ) : boolean
return boolean

mergeSystemUnderTestConfig() public method

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

newGroup() public method

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
return TestEnvironmentGroup a new and empty group, ready for you to define

setModuleSettings() public method

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

setName() public method

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

Property Details

$groups protected_oe property

a list of all of the groups of hosts in our test environment
protected array $groups
return array

$moduleSettings protected_oe property

these settings apply to any host in any group in this environment
protected null|object $moduleSettings
return null | object

$name protected_oe property

the name of this test environment
protected string $name
return string