PHP Trait Neos\Flow\Tests\Behavior\Features\Bootstrap\SecurityOperationsTrait

Note that this trait requires that the following members are available: - $this->objectManager (Neos\Flow\ObjectManagement\ObjectManagerInterface) - $this->environment (Neos\Flow\Utility\Environment) Note: This trait expects the IsolatedBehatStepsTrait to be available! Note: Make sure to call $this->setupSecurity() in the constructor of your behat context for these steps to work in your tests!
显示文件 Open project: neos/flow-development-collection

Protected Properties

Property Type Description
$securityInitialized
$testingPolicyPathAndFilename

Public Methods

Method Description
cleanUpSecurity ( )
iAmAuthenticatedWithRole ( $roleIdentifier )
iAmNotAuthenticated ( )
iCanCallTheMethodOfClassWithArguments ( $not, $methodName, $className, $arguments = '' )
iHaveTheFollowingPolicies ( $string ) WARNING: If using this step definition, IT MUST RUN AS ABSOLUTELY FIRST STEP IN A SCENARIO!

Protected Methods

Method Description
authenticateAccount ( Account $account ) : void Prepares the environment for and conducts an account authentication
authenticateRoles ( array $roleNames ) : Neos\Flow\Security\Accountt Creates a new account, assigns it the given roles and authenticates it.
setupSecurity ( ) : void Sets up security test requirements

Method Details

authenticateAccount() protected method

Prepares the environment for and conducts an account authentication
protected authenticateAccount ( Account $account ) : void
$account Neos\Flow\Security\Account
return void

authenticateRoles() protected method

The created account is returned for further modification, for example for attaching a Party object to it.
protected authenticateRoles ( array $roleNames ) : Neos\Flow\Security\Accountt
$roleNames array A list of roles the new account should have
return Neos\Flow\Security\Accountt The created account

cleanUpSecurity() public static method

public static cleanUpSecurity ( )

iAmAuthenticatedWithRole() public method

public iAmAuthenticatedWithRole ( $roleIdentifier )

iAmNotAuthenticated() public method

public iAmNotAuthenticated ( )

iCanCallTheMethodOfClassWithArguments() public method

public iCanCallTheMethodOfClassWithArguments ( $not, $methodName, $className, $arguments = '' )

iHaveTheFollowingPolicies() public method

WARNING: If using this step definition, IT MUST RUN AS ABSOLUTELY FIRST STEP IN A SCENARIO!
public iHaveTheFollowingPolicies ( $string )

setupSecurity() protected method

Security is based on action requests so we need a working route for the TestingProvider.
protected setupSecurity ( ) : void
return void

Property Details

$securityInitialized protected_oe property

protected $securityInitialized

$testingPolicyPathAndFilename protected_oe static_oe property

protected static $testingPolicyPathAndFilename