LoginContext
class LoginContext implements Context (View source)
LoginContext
Context used to define steps related to login and logout functionality
Traits
Represents a behat context which is aware of a main {SilverStripeContext} context.
Properties
protected | SilverStripeContext | $mainContext | from MainContextAwareTrait |
Methods
public
$this
public
iAmLoggedInWithPermissions(string $permCode)
Creates a member in a group with the correct permissions.
protected
Member
generateMemberWithPermission(string $email, string $password, string $permCode)
Get or generate a member with the given permission code
Details
SilverStripeContext
getMainContext()
Get the main context
$this
setMainContext(SilverStripeContext $mainContext)
No description
detectMainContext(BeforeScenarioScope $scope)
Helper method to detect the main context
stepIAmLoggedIn()
No description
iAmLoggedInWithPermissions(string $permCode)
Creates a member in a group with the correct permissions.
Example: Given I am logged in with "ADMIN" permissions
stepIAmNotLoggedIn()
No description
stepILogInWith(string $email, string $password)
No description
stepIShouldSeeALogInForm()
No description
stepIShouldSeeALogOutForm()
No description
stepIWillSeeALogInMessage(string $type)
No description
stepPasswordForEmailShouldBe(string $id, string $password)
No description
protected Member
generateMemberWithPermission(string $email, string $password, string $permCode)
Get or generate a member with the given permission code