PHP Class DataSift\Storyplayer\PlayerLib\StoryTeller

all actions and tests inside a story are executed through an instance of this class, making this class the StoryTeller :)
Exibir arquivo Open project: datasift/storyplayer Class Usage Examples

Protected Properties

Property Type Description
$self StoryTeller singleton instance of StoryTeller

Public Methods

Method Description
__call ( string $methodName, array $methodArgs ) : mixed
__construct ( DataSift\Storyplayer\Injectables $injectables )
closeAllOpenActions ( ) : void
convertDataForOutput ( $data ) : void
getActionLogger ( ) : Action_Logger
getActiveConfig ( ) : ActiveConfig
getCheckpoint ( ) : Story_Checkpoint
getConfig ( ) : object
getCurrentPhase ( ) : Phase
getCurrentPhaseName ( ) : string
getDeviceAdapter ( ) : DataSift\Storyplayer\DeviceLib\DeviceAdapter
getDeviceDetails ( ) : DataSift\Stone\ObjectLib\BaseObject
getDeviceName ( ) : string
getEnvironment ( ) : FromEnvironment
getEnvironmentName ( ) : void
getNewCommandRunner ( ) : CommandRunner
getOutput ( ) : Output
getPageContext ( ) : PageContext
getParams ( ) : array
getPersistDevice ( ) : boolean
getPersistProcesses ( ) : boolean
getPersistTestEnvironment ( ) : boolean
getPhaseLoader ( ) : PhaseLoader
getRunningDevice ( ) : DataSift\WebDriver\WebDriverSession
getRuntimeConfig ( ) : object
getRuntimeConfigManager ( ) : RuntimeConfigManager
getScriptFilename ( ) : string
getStory ( ) : Story
getSystemUnderTestConfig ( ) ------------------------------------------------------------------
getTestEnvironmentConfig ( ) : object
getTestEnvironmentName ( ) : string
getTestEnvironmentSignature ( ) : string
getTestUsers ( ) : DataSift\Stone\ObjectLib\BaseObject return the list of test users
getTestUsersFileIsReadOnly ( ) : boolean should we treat the file on disk where we loaded test user data from as read-only?
getTestUsersFilename ( ) : string retrieve the filename we loaded test users from
hasTestUsers ( ) : boolean have we loaded any test users from disk?
instance ( )
saveRuntimeConfig ( ) : void
setActionLogger ( Action_Logger $actionLogger ) : StoryTeller
setCheckpoint ( Story_Checkpoint $checkpoint ) : StoryTeller
setConfig ( $config ) : void
setCurrentPhase ( Phase $newPhase ) : void
setDataFormatter ( $dataFormatter )
setDevice ( string $deviceName, DataSift\Stone\ObjectLib\BaseObject $deviceDetails )
setDeviceAdapter ( DataSift\Storyplayer\DeviceLib\DeviceAdapter | null $adapter )
setOutput ( Output $output ) : void
setPageContext ( PageContext $pageContext ) : StoryTeller
setPersistDevice ( ) : void
setPersistProcesses ( ) : void
setPersistTestEnvironment ( ) : void
setPhaseLoader ( $phaseLoader )
setProseLoader ( $proseLoader ) : void
setRuntimeConfig ( $runtimeConfig ) : void
setRuntimeConfigManager ( RuntimeConfigManager $runtimeConfigManager ) : StoryTeller
setScriptFilename ( $filename ) : void
setStory ( Story $story ) : StoryTeller track the story that we are testing
setTestUsers ( DataSift\Stone\ObjectLib\BaseObject $users ) remember the test users that we have
setTestUsersFileIsReadOnly ( boolean $readOnly = true ) set whether or not we treat the file on disk were we loaded test user data from as read-only
setTestUsersFilename ( string $filename ) remember the filename we loaded test users from
startAction ( $text ) : Action_LogItem
startDevice ( ) : void
stopDevice ( ) : void

Method Details

__call() public method

public __call ( string $methodName, array $methodArgs ) : mixed
$methodName string
$methodArgs array
return mixed

__construct() public method

public __construct ( DataSift\Storyplayer\Injectables $injectables )
$injectables DataSift\Storyplayer\Injectables

closeAllOpenActions() public method

public closeAllOpenActions ( ) : void
return void

convertDataForOutput() public method

public convertDataForOutput ( $data ) : void
return void

getActionLogger() public method

public getActionLogger ( ) : Action_Logger
return Action_Logger

getActiveConfig() public method

public getActiveConfig ( ) : ActiveConfig
return DataSift\Storyplayer\ConfigLib\ActiveConfig

getCheckpoint() public method

public getCheckpoint ( ) : Story_Checkpoint
return Story_Checkpoint

getConfig() public method

public getConfig ( ) : object
return object

getCurrentPhase() public method

public getCurrentPhase ( ) : Phase
return DataSift\Storyplayer\Phases\Phase

getCurrentPhaseName() public method

public getCurrentPhaseName ( ) : string
return string

getDeviceAdapter() public method

public getDeviceAdapter ( ) : DataSift\Storyplayer\DeviceLib\DeviceAdapter
return DataSift\Storyplayer\DeviceLib\DeviceAdapter

getDeviceDetails() public method

public getDeviceDetails ( ) : DataSift\Stone\ObjectLib\BaseObject
return DataSift\Stone\ObjectLib\BaseObject

getDeviceName() public method

public getDeviceName ( ) : string
return string

getEnvironment() public method

public getEnvironment ( ) : FromEnvironment
return Prose\FromEnvironment

getEnvironmentName() public method

public getEnvironmentName ( ) : void
return void

getNewCommandRunner() public method

public getNewCommandRunner ( ) : CommandRunner
return DataSift\Storyplayer\CommandLib\CommandRunner

getOutput() public method

public getOutput ( ) : Output
return DataSift\Storyplayer\Output

getPageContext() public method

public getPageContext ( ) : PageContext
return Prose\PageContext

getParams() public method

public getParams ( ) : array
return array

getPersistDevice() public method

public getPersistDevice ( ) : boolean
return boolean

getPersistProcesses() public method

public getPersistProcesses ( ) : boolean
return boolean

getPersistTestEnvironment() public method

getPhaseLoader() public method

public getPhaseLoader ( ) : PhaseLoader
return PhaseLoader

getRunningDevice() public method

public getRunningDevice ( ) : DataSift\WebDriver\WebDriverSession
return DataSift\WebDriver\WebDriverSession

getRuntimeConfig() public method

public getRuntimeConfig ( ) : object
return object

getRuntimeConfigManager() public method

public getRuntimeConfigManager ( ) : RuntimeConfigManager
return DataSift\Storyplayer\Cli\RuntimeConfigManager

getScriptFilename() public method

public getScriptFilename ( ) : string
return string

getStory() public method

public getStory ( ) : Story
return Story

getSystemUnderTestConfig() public method

------------------------------------------------------------------

getTestEnvironmentConfig() public method

public getTestEnvironmentConfig ( ) : object
return object

getTestEnvironmentName() public method

public getTestEnvironmentName ( ) : string
return string

getTestEnvironmentSignature() public method

getTestUsers() public method

return the list of test users
public getTestUsers ( ) : DataSift\Stone\ObjectLib\BaseObject
return DataSift\Stone\ObjectLib\BaseObject

getTestUsersFileIsReadOnly() public method

NOTE: we never treat the loaded data as read-only. Stories are free to change this data, and these changes will persist between stories. We just won't save any changes back to disk if this method call returns TRUE.

getTestUsersFilename() public method

retrieve the filename we loaded test users from
public getTestUsersFilename ( ) : string
return string

hasTestUsers() public method

have we loaded any test users from disk?
public hasTestUsers ( ) : boolean
return boolean TRUE if we have

instance() public static method

public static instance ( )

saveRuntimeConfig() public method

public saveRuntimeConfig ( ) : void
return void

setActionLogger() public method

public setActionLogger ( Action_Logger $actionLogger ) : StoryTeller
$actionLogger Action_Logger
return StoryTeller

setCheckpoint() public method

public setCheckpoint ( Story_Checkpoint $checkpoint ) : StoryTeller
$checkpoint Story_Checkpoint
return StoryTeller

setConfig() public method

public setConfig ( $config ) : void
return void

setCurrentPhase() public method

public setCurrentPhase ( Phase $newPhase ) : void
$newPhase DataSift\Storyplayer\Phases\Phase
return void

setDataFormatter() public method

public setDataFormatter ( $dataFormatter )

setDevice() public method

public setDevice ( string $deviceName, DataSift\Stone\ObjectLib\BaseObject $deviceDetails )
$deviceName string
$deviceDetails DataSift\Stone\ObjectLib\BaseObject

setDeviceAdapter() public method

public setDeviceAdapter ( DataSift\Storyplayer\DeviceLib\DeviceAdapter | null $adapter )
$adapter DataSift\Storyplayer\DeviceLib\DeviceAdapter | null

setOutput() public method

public setOutput ( Output $output ) : void
$output DataSift\Storyplayer\Output
return void

setPageContext() public method

public setPageContext ( PageContext $pageContext ) : StoryTeller
$pageContext Prose\PageContext
return StoryTeller

setPersistDevice() public method

public setPersistDevice ( ) : void
return void

setPersistProcesses() public method

public setPersistProcesses ( ) : void
return void

setPersistTestEnvironment() public method

public setPersistTestEnvironment ( ) : void
return void

setPhaseLoader() public method

public setPhaseLoader ( $phaseLoader )

setProseLoader() public method

public setProseLoader ( $proseLoader ) : void
return void

setRuntimeConfig() public method

public setRuntimeConfig ( $runtimeConfig ) : void
return void

setRuntimeConfigManager() public method

public setRuntimeConfigManager ( RuntimeConfigManager $runtimeConfigManager ) : StoryTeller
$runtimeConfigManager DataSift\Storyplayer\Cli\RuntimeConfigManager
return StoryTeller

setScriptFilename() public method

public setScriptFilename ( $filename ) : void
return void

setStory() public method

NOTE: setting the story also creates a new Story_Result object so that we can track how the story is getting on
public setStory ( Story $story ) : StoryTeller
$story Story
return StoryTeller

setTestUsers() public method

remember the test users that we have
public setTestUsers ( DataSift\Stone\ObjectLib\BaseObject $users )
$users DataSift\Stone\ObjectLib\BaseObject our test users

setTestUsersFileIsReadOnly() public method

NOTE: we never treat the loaded data as read-only. Stories are free to change this data, and these changes will persist between stories. We just won't save any changes back to disk if you set this to TRUE.
public setTestUsersFileIsReadOnly ( boolean $readOnly = true )
$readOnly boolean TRUE if we should not save data back to this file

setTestUsersFilename() public method

we'll re-use this filename later on when it is time to save the test users back to disk
public setTestUsersFilename ( string $filename )
$filename string the filename to remember

startAction() public method

public startAction ( $text ) : Action_LogItem
return Action_LogItem

startDevice() public method

public startDevice ( ) : void
return void

stopDevice() public method

public stopDevice ( ) : void
return void

Property Details

$self protected_oe static_oe property

singleton instance of StoryTeller
protected static StoryTeller,DataSift\Storyplayer\PlayerLib $self
return StoryTeller