trait MainContextAwareTrait (View source)

Represents a behat context which is aware of a main {SilverStripeContext} context.

Nested contexts are bootstrapped by SilverStripeContext::gatherContexts()

Properties

protected SilverStripeContext $mainContext

Methods

public
getMainContext()

Get the main context

public
$this
setMainContext(SilverStripeContext $mainContext)

No description

public
detectMainContext(BeforeScenarioScope $scope)

Helper method to detect the main context

Details

SilverStripeContext getMainContext()

Get the main context

Return Value

SilverStripeContext

$this setMainContext(SilverStripeContext $mainContext)

No description

Parameters

SilverStripeContext $mainContext

Return Value

$this

detectMainContext(BeforeScenarioScope $scope)

Helper method to detect the main context

Parameters

BeforeScenarioScope $scope