PHP Класс Pantheon\Terminus\FeatureTests\FeatureContext

Наследование: implements Behat\Behat\Context\Context
Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
$cliroot

Открытые методы

Метод Описание
__construct ( [array] $parameters ) : [void] Initializes context
aSiteNamed ( string $site ) : boolean Ensures a site of the given name exists
aSiteNamedBelongingTo ( [string] $site, [string] $org ) : [boolean] Ensures a site of the given name exists and belongs to given org
before ( [ScenarioEvent] $event ) : [void]
connectionMode ( [string] $site, [string] $mode = null ) : [void] Changes or displays mode, given or not, of given site
iAddToTheTeamOn ( [string] $email, [string] $site ) : [void] Adds $email user from $site
iAmAuthenticated ( ) : [void] Logs in user with username and password set in behat.yml And a blank slate cache
iAmPrompted ( [string] $prompt, [string] $site, [string] $url = "https://[[dashboard_host]]/" ) : [void]
iCheckTheListOfEnvironmentsOn ( [string] $site ) : [string]
iCheckTheUrlForValidity ( [string] $url ) : [void] Checks to see if a URL is valid
iCheckTheUserAmLoggedInAs ( ) : [void] Checks which user Terminus is operating as
iClearTheCaches ( [string] $env, [string] $site ) : [void] Clears site caches
iCloneTheEnvironment ( [string] $from_env, [string] $to_env, [string] $site ) : [void]
iCommitChanges ( [string] $env, [string] $site, [string] $message ) : [void] Commits changes to given site's given env with given message
iCreateMultidevEnv ( [string] $multidev, [string] $env, [string] $site ) : [void] Creates a multidev env of given name on given site cloning given env
iCreateSiteNamed ( [string] $upstream, [string] $name, [string] $org = false ) : [void] Creates a site for the given name
iDeleteTheSiteNamed ( [string] $site ) : [void] Deletes a site of the given name
iDeployTheEnvironmentOf ( [string] $env, [string] $from, [string] $site, [string] $message ) : [void]
iEnterInput ( )
iExpireMySession ( ) : [void] Intentionally expires the user's session
iGetInfoForTheEnvironmentOf ( [string] $env, [string] $site ) : [string] Queries for info for a given site
iGetInfoForTheSite ( [string] $site ) : [string] Queries for info for a given site
iHaveAtLeastSite ( [integer] $min ) : [boolean] Checks which user Terminus is operating as
iHaveNoSavedMachineTokens ( ) : boolean Removes all machine tokens from the running machine
iHaveSavedMachineTokens ( integer $num_tokens ) : boolean Ensures at least X machine tokens exist in the tokens directory
iHaveSites ( [integer] $num ) : [boolean] Checks which user Terminus is operating as
iInitializeTheEnvironmentOn ( [string] $env, [string] $site ) : [void]
iInstallTheModuleTo ( [string] $module, [string] $site ) : [void] Installs given module to given Drupal site
iListTheBackupsOf ( [string] $env, [string] $site ) : [string] List the backups of the given environment of the given site
iListTheSites ( ) : [void] Lists all sites user is on the team of
iListTheTeamMembersOn ( [string] $site ) : [void] Lists team members
iLogIn ( [string] $token = '[[machine_token]]' ) : [void] Logs in user
iLogInAs ( [string] $email = '[[username]]' ) : [void] Logs in a user with a locally saved machine token
iLogOut ( ) : [void] Logs user out
iMakeBackupElementsOfTheEnvironment ( [string] $elements, [string] $env, [string] $site ) : [void] Makes a backup of given elements of given site's given environment
iMergeTheEnvironment ( [string] $from_env, [string] $to_env, [string] $site ) : [void]
iRemoveFromTheTeamOn ( [string] $email, [string] $site ) : [void] Removes $email user from $site
iRestoreTheEnvironmentOfFromBackup ( [string] $env, [string] $site ) : [void]
iRun ( [string] $command ) : [string]
iShouldGet ( [string] $string ) : [boolean]
iShouldGetOneOfTheFollowing ( [array] $list_string ) : [boolean]
iShouldGetValidUuid ( ) : boolean
iShouldHaveNewBackup ( ) : [boolean] Checks for backups made since the test started running
iShouldHaveRecords ( [integer] $number ) : [void] Checks the number of records returned against a given quantity
iShouldNotGet ( [string] $string ) : [boolean] Ensures that you do not recieve param $string as result
iShouldNotGetOneOfTheFollowing ( [array] $list_string ) : [boolean]
iShouldSeeAProgressBarWithTheMessage ( $message )
isMemberOfTheTeamOn ( [string] $member, [string] $site ) : [boolean] Ensures that a user is not on a site's team
isNotMemberOfTheTeamOn ( [string] $member, [string] $site ) : [boolean] Ensures that a user is not on a site's team
noSiteNamed ( [string] $site ) : [boolean] Ensures there is no site with the given name. Loops until this is so
serviceLevel ( [string] $site, [string] $service_level = null ) : [void] Gets or sets service level
setTestStatus ( [string] $status ) : [boolean] Automatically assigns pass/fail/skip to the test result
shouldSeeATableWithHeaders ( string $headers ) : boolean Checks the output for a table with the given headers
shouldSeeATableWithRows ( $rows ) : boolean Checks the output for a table with the given row values
shouldSeeATypeOfMessage ( $type, $message = null ) : boolean Checks the output for a type of message. Message to match is optional.
thisStepIsPending ( string $description )

Приватные методы

Метод Описание
checkResult ( [string] $needle, [string] $haystack ) : [boolean] Checks the the haystack for the needle
getTags ( [ScenarioEvent] $event ) Returns tags in easy-to-use array format.
openInBrowser ( [string] $url ) : [void] Opens param $url in the default browser
read ( ) : [string] Reads one line from STDIN
replacePlaceholders ( [string] $string, [array] $replacements = [] ) : [string] Exchanges values in given string with square brackets for values in $this->parameters
setCassetteName ( [array] $event ) : [string] Sets $this->cassette_name and returns name of the cassette to be used.

Описание методов

__construct() публичный Метод

Initializes context
public __construct ( [array] $parameters ) : [void]
$parameters [array]
Результат [void]

aSiteNamed() публичный Метод

Ensures a site of the given name exists
public aSiteNamed ( string $site ) : boolean
$site string Name of site to ensure exists
Результат boolean Always true, else errs

aSiteNamedBelongingTo() публичный Метод

Ensures a site of the given name exists and belongs to given org
public aSiteNamedBelongingTo ( [string] $site, [string] $org ) : [boolean]
$site [string]
$org [string]
Результат [boolean]

before() публичный Метод

public before ( [ScenarioEvent] $event ) : [void]
$event [ScenarioEvent]
Результат [void]

connectionMode() публичный Метод

Changes or displays mode, given or not, of given site
public connectionMode ( [string] $site, [string] $mode = null ) : [void]
$site [string]
$mode [string]
Результат [void]

iAddToTheTeamOn() публичный Метод

Adds $email user from $site
public iAddToTheTeamOn ( [string] $email, [string] $site ) : [void]
$email [string]
$site [string]
Результат [void]

iAmAuthenticated() публичный Метод

Logs in user with username and password set in behat.yml And a blank slate cache
public iAmAuthenticated ( ) : [void]
Результат [void]

iAmPrompted() публичный Метод

public iAmPrompted ( [string] $prompt, [string] $site, [string] $url = "https://[[dashboard_host]]/" ) : [void]
$prompt [string]
$site [string]
$url [string]
Результат [void]

iCheckTheListOfEnvironmentsOn() публичный Метод

public iCheckTheListOfEnvironmentsOn ( [string] $site ) : [string]
$site [string]
Результат [string]

iCheckTheUrlForValidity() публичный Метод

Checks to see if a URL is valid
public iCheckTheUrlForValidity ( [string] $url ) : [void]
$url [string]
Результат [void]

iCheckTheUserAmLoggedInAs() публичный Метод

Checks which user Terminus is operating as
public iCheckTheUserAmLoggedInAs ( ) : [void]
Результат [void]

iClearTheCaches() публичный Метод

Clears site caches
public iClearTheCaches ( [string] $env, [string] $site ) : [void]
$env [string]
$site [string]
Результат [void]

iCloneTheEnvironment() публичный Метод

public iCloneTheEnvironment ( [string] $from_env, [string] $to_env, [string] $site ) : [void]
$from_env [string]
$to_env [string]
$site [string]
Результат [void]

iCommitChanges() публичный Метод

Commits changes to given site's given env with given message
public iCommitChanges ( [string] $env, [string] $site, [string] $message ) : [void]
$env [string]
$site [string]
$message [string]
Результат [void]

iCreateMultidevEnv() публичный Метод

Creates a multidev env of given name on given site cloning given env
public iCreateMultidevEnv ( [string] $multidev, [string] $env, [string] $site ) : [void]
$multidev [string]
$env [string]
$site [string]
Результат [void]

iCreateSiteNamed() публичный Метод

Creates a site for the given name
public iCreateSiteNamed ( [string] $upstream, [string] $name, [string] $org = false ) : [void]
$upstream [string]
$name [string]
$org [string]
Результат [void]

iDeleteTheSiteNamed() публичный Метод

Deletes a site of the given name
public iDeleteTheSiteNamed ( [string] $site ) : [void]
$site [string]
Результат [void]

iDeployTheEnvironmentOf() публичный Метод

public iDeployTheEnvironmentOf ( [string] $env, [string] $from, [string] $site, [string] $message ) : [void]
$env [string]
$from [string]
$site [string]
$message [string]
Результат [void]

iEnterInput() публичный Метод

public iEnterInput ( )

iExpireMySession() публичный Метод

Intentionally expires the user's session
public iExpireMySession ( ) : [void]
Результат [void]

iGetInfoForTheEnvironmentOf() публичный Метод

Queries for info for a given site
public iGetInfoForTheEnvironmentOf ( [string] $env, [string] $site ) : [string]
$env [string]
$site [string]
Результат [string]

iGetInfoForTheSite() публичный Метод

Queries for info for a given site
public iGetInfoForTheSite ( [string] $site ) : [string]
$site [string]
Результат [string]

iHaveAtLeastSite() публичный Метод

Checks which user Terminus is operating as
public iHaveAtLeastSite ( [integer] $min ) : [boolean]
$min [integer]
Результат [boolean]

iHaveNoSavedMachineTokens() публичный Метод

Removes all machine tokens from the running machine
public iHaveNoSavedMachineTokens ( ) : boolean
Результат boolean

iHaveSavedMachineTokens() публичный Метод

Ensures at least X machine tokens exist in the tokens directory
public iHaveSavedMachineTokens ( integer $num_tokens ) : boolean
$num_tokens integer Number of tokens to ensure exist
Результат boolean

iHaveSites() публичный Метод

Checks which user Terminus is operating as
public iHaveSites ( [integer] $num ) : [boolean]
$num [integer]
Результат [boolean]

iInitializeTheEnvironmentOn() публичный Метод

public iInitializeTheEnvironmentOn ( [string] $env, [string] $site ) : [void]
$env [string]
$site [string]
Результат [void]

iInstallTheModuleTo() публичный Метод

Installs given module to given Drupal site
public iInstallTheModuleTo ( [string] $module, [string] $site ) : [void]
$module [string]
$site [string]
Результат [void]

iListTheBackupsOf() публичный Метод

List the backups of the given environment of the given site
public iListTheBackupsOf ( [string] $env, [string] $site ) : [string]
$env [string]
$site [string]
Результат [string]

iListTheSites() публичный Метод

Lists all sites user is on the team of
public iListTheSites ( ) : [void]
Результат [void]

iListTheTeamMembersOn() публичный Метод

Lists team members
public iListTheTeamMembersOn ( [string] $site ) : [void]
$site [string]
Результат [void]

iLogIn() публичный Метод

Logs in user
public iLogIn ( [string] $token = '[[machine_token]]' ) : [void]
$token [string]
Результат [void]

iLogInAs() публичный Метод

Logs in a user with a locally saved machine token
public iLogInAs ( [string] $email = '[[username]]' ) : [void]
$email [string]
Результат [void]

iLogOut() публичный Метод

Logs user out
public iLogOut ( ) : [void]
Результат [void]

iMakeBackupElementsOfTheEnvironment() публичный Метод

Makes a backup of given elements of given site's given environment
public iMakeBackupElementsOfTheEnvironment ( [string] $elements, [string] $env, [string] $site ) : [void]
$elements [string]
$env [string]
$site [string]
Результат [void]

iMergeTheEnvironment() публичный Метод

public iMergeTheEnvironment ( [string] $from_env, [string] $to_env, [string] $site ) : [void]
$from_env [string]
$to_env [string]
$site [string]
Результат [void]

iRemoveFromTheTeamOn() публичный Метод

Removes $email user from $site
public iRemoveFromTheTeamOn ( [string] $email, [string] $site ) : [void]
$email [string]
$site [string]
Результат [void]

iRestoreTheEnvironmentOfFromBackup() публичный Метод

public iRestoreTheEnvironmentOfFromBackup ( [string] $env, [string] $site ) : [void]
$env [string]
$site [string]
Результат [void]

iRun() публичный Метод

public iRun ( [string] $command ) : [string]
$command [string]
Результат [string]

iShouldGet() публичный Метод

public iShouldGet ( [string] $string ) : [boolean]
$string [string]
Результат [boolean]

iShouldGetOneOfTheFollowing() публичный Метод

public iShouldGetOneOfTheFollowing ( [array] $list_string ) : [boolean]
$list_string [array]
Результат [boolean]

iShouldGetValidUuid() публичный Метод

public iShouldGetValidUuid ( ) : boolean
Результат boolean

iShouldHaveNewBackup() публичный Метод

Checks for backups made since the test started running
public iShouldHaveNewBackup ( ) : [boolean]
Результат [boolean]

iShouldHaveRecords() публичный Метод

Checks the number of records returned against a given quantity
public iShouldHaveRecords ( [integer] $number ) : [void]
$number [integer]
Результат [void]

iShouldNotGet() публичный Метод

Ensures that you do not recieve param $string as result
public iShouldNotGet ( [string] $string ) : [boolean]
$string [string]
Результат [boolean]

iShouldNotGetOneOfTheFollowing() публичный Метод

public iShouldNotGetOneOfTheFollowing ( [array] $list_string ) : [boolean]
$list_string [array]
Результат [boolean]

iShouldSeeAProgressBarWithTheMessage() публичный Метод

isMemberOfTheTeamOn() публичный Метод

Ensures that a user is not on a site's team
public isMemberOfTheTeamOn ( [string] $member, [string] $site ) : [boolean]
$member [string]
$site [string]
Результат [boolean]

isNotMemberOfTheTeamOn() публичный Метод

Ensures that a user is not on a site's team
public isNotMemberOfTheTeamOn ( [string] $member, [string] $site ) : [boolean]
$member [string]
$site [string]
Результат [boolean]

noSiteNamed() публичный Метод

Ensures there is no site with the given name. Loops until this is so
public noSiteNamed ( [string] $site ) : [boolean]
$site [string]
Результат [boolean]

serviceLevel() публичный Метод

Gets or sets service level
public serviceLevel ( [string] $site, [string] $service_level = null ) : [void]
$site [string]
$service_level [string]
Результат [void]

setTestStatus() публичный Метод

Automatically assigns pass/fail/skip to the test result
public setTestStatus ( [string] $status ) : [boolean]
$status [string]
Результат [boolean]

shouldSeeATableWithHeaders() публичный Метод

Checks the output for a table with the given headers
public shouldSeeATableWithHeaders ( string $headers ) : boolean
$headers string Comma separated row values to match
Результат boolean true if $headers exists in output

shouldSeeATableWithRows() публичный Метод

Checks the output for a table with the given row values
public shouldSeeATableWithRows ( $rows ) : boolean
$rows string newline separated row values to match
Результат boolean true if all of the rows are present in the output

shouldSeeATypeOfMessage() публичный Метод

Checks the output for a type of message. Message to match is optional.
public shouldSeeATypeOfMessage ( $type, $message = null ) : boolean
$type string One of the standard logging levels
$message string Optional message to match in the output
Результат boolean True if message is the correct type and exists in output if given

thisStepIsPending() публичный Метод

public thisStepIsPending ( string $description )
$description string feature description of what is still pending

Описание свойств

$cliroot публичное свойство

public $cliroot