PHP Class Sylius\Behat\Page\Page

Author: Kamil Kokot ([email protected])
Inheritance: implements Sylius\Behat\Page\PageInterface
Show file Open project: sylius/sylius Class Usage Examples

Public Methods

Method Description
__construct ( Behat\Mink\Session $session, array $parameters = [] )
isOpen ( array $urlParameters = [] )
open ( array $urlParameters = [] )
tryToOpen ( array $urlParameters = [] )
verify ( array $urlParameters = [] )

Protected Methods

Method Description
getDefinedElements ( ) : array Defines elements by returning an array with items being: - :elementName => :cssLocator - :elementName => [:selectorType => :locator]
getDocument ( ) : Behat\Mink\Element\DocumentElement
getDriver ( ) : Behat\Mink\Driver\DriverInterface
getElement ( string $name, array $parameters = [] ) : Behat\Mink\Element\NodeElement
getParameter ( string $name ) : Behat\Mink\Element\NodeElement
getSession ( ) : Behat\Mink\Session
getUrl ( array $urlParameters = [] ) : string
hasElement ( string $name, array $parameters = [] ) : boolean
verifyStatusCode ( )
verifyUrl ( array $urlParameters = [] ) Overload to verify if the current url matches the expected one. Throw an exception otherwise.

Private Methods

Method Description
createElement ( string $name, array $parameters = [] ) : Behat\Mink\Element\NodeElement
getSelectorAsXpath ( string | array $selector, Behat\Mink\Selector\SelectorsHandler $selectorsHandler ) : string
resolveParameters ( string $name, array $parameters, array $definedElements ) : string

Method Details

__construct() public method

public __construct ( Behat\Mink\Session $session, array $parameters = [] )
$session Behat\Mink\Session
$parameters array

getDefinedElements() protected method

Defines elements by returning an array with items being: - :elementName => :cssLocator - :elementName => [:selectorType => :locator]
protected getDefinedElements ( ) : array
return array

getDocument() protected method

protected getDocument ( ) : Behat\Mink\Element\DocumentElement
return Behat\Mink\Element\DocumentElement

getDriver() protected method

protected getDriver ( ) : Behat\Mink\Driver\DriverInterface
return Behat\Mink\Driver\DriverInterface

getElement() protected method

protected getElement ( string $name, array $parameters = [] ) : Behat\Mink\Element\NodeElement
$name string
$parameters array
return Behat\Mink\Element\NodeElement

getParameter() protected method

protected getParameter ( string $name ) : Behat\Mink\Element\NodeElement
$name string
return Behat\Mink\Element\NodeElement

getSession() protected method

protected getSession ( ) : Behat\Mink\Session
return Behat\Mink\Session

getUrl() abstract protected method

abstract protected getUrl ( array $urlParameters = [] ) : string
$urlParameters array
return string

hasElement() protected method

protected hasElement ( string $name, array $parameters = [] ) : boolean
$name string
$parameters array
return boolean

isOpen() public method

public isOpen ( array $urlParameters = [] )
$urlParameters array

open() public method

public open ( array $urlParameters = [] )
$urlParameters array

tryToOpen() public method

public tryToOpen ( array $urlParameters = [] )
$urlParameters array

verify() public method

public verify ( array $urlParameters = [] )
$urlParameters array

verifyStatusCode() protected method

protected verifyStatusCode ( )

verifyUrl() protected method

Overload to verify if the current url matches the expected one. Throw an exception otherwise.
protected verifyUrl ( array $urlParameters = [] )
$urlParameters array