PHP Class Behat\RestTestingContext\BaseContext

Inheritance: implements Behat\RestTestingExtension\Context\RestTestingAwareContext, implements Behat\Behat\Context\SnippetAcceptingContext
Afficher le fichier Open project: deminy/behat-rest-testing Class Usage Examples

Protected Properties

Свойство Type Description
$contexts Behat\Behat\Context\Context[]
$data array Store data used across different contexts and steps.
$restContext RestContext
$webApiContext Behat\WebApiExtension\Context\WebApiContext

Méthodes publiques

Méthode Description
__construct ( array $params = [] )
__get ( $name ) : mixed
__set ( string $name, $value ) : mixed
exists ( string $name ) : boolean Check if specified field name exists or not.
get ( string $name = null ) : mixed Get data by field name, or return all data if no field name provided.
getRestContext ( ) : RestContext
getWebApiContext ( ) : Behat\WebApiExtension\Context\WebApiContext
set ( string $name, mixed $value ) : void Set value on given field name.
setRestContext ( RestContext $restContext ) : void
setWebApiContext ( Behat\WebApiExtension\Context\WebApiContext $webApiContext ) : void

Méthodes protégées

Méthode Description
addContext ( Behat\Behat\Context\Context $context = null )
getContext ( string $name ) : Behat\Behat\Context\Context | null
getResponse ( ) : GuzzleHttp\Message\ResponseInterface
setResponse ( GuzzleHttp\Message\ResponseInterface $response ) : void
setResponseBody ( string $body ) : void

Method Details

__construct() public méthode

public __construct ( array $params = [] )
$params array

__get() public méthode

public __get ( $name ) : mixed
$name
Résultat mixed

__set() public méthode

public __set ( string $name, $value ) : mixed
$name string
Résultat mixed $value

addContext() protected méthode

protected addContext ( Behat\Behat\Context\Context $context = null )
$context Behat\Behat\Context\Context

exists() public static méthode

Check if specified field name exists or not.
public static exists ( string $name ) : boolean
$name string Field name.
Résultat boolean

get() public static méthode

Get data by field name, or return all data if no field name provided.
public static get ( string $name = null ) : mixed
$name string Field name.
Résultat mixed

getContext() protected méthode

protected getContext ( string $name ) : Behat\Behat\Context\Context | null
$name string
Résultat Behat\Behat\Context\Context | null

getResponse() protected méthode

protected getResponse ( ) : GuzzleHttp\Message\ResponseInterface
Résultat GuzzleHttp\Message\ResponseInterface

getRestContext() public static méthode

public static getRestContext ( ) : RestContext
Résultat RestContext

getWebApiContext() public static méthode

public static getWebApiContext ( ) : Behat\WebApiExtension\Context\WebApiContext
Résultat Behat\WebApiExtension\Context\WebApiContext

set() public static méthode

Set value on given field name.
public static set ( string $name, mixed $value ) : void
$name string Field name.
$value mixed Field value.
Résultat void

setResponse() protected méthode

protected setResponse ( GuzzleHttp\Message\ResponseInterface $response ) : void
$response GuzzleHttp\Message\ResponseInterface
Résultat void

setResponseBody() protected méthode

protected setResponseBody ( string $body ) : void
$body string
Résultat void

setRestContext() public static méthode

public static setRestContext ( RestContext $restContext ) : void
$restContext RestContext
Résultat void

setWebApiContext() public static méthode

public static setWebApiContext ( Behat\WebApiExtension\Context\WebApiContext $webApiContext ) : void
$webApiContext Behat\WebApiExtension\Context\WebApiContext
Résultat void

Property Details

$contexts protected_oe static_oe property

protected static Context[],Behat\Behat\Context $contexts
Résultat Behat\Behat\Context\Context[]

$data protected_oe static_oe property

Store data used across different contexts and steps.
protected static array $data
Résultat array

$restContext protected_oe static_oe property

protected static RestContext,Behat\RestTestingContext $restContext
Résultat RestContext

$webApiContext protected_oe static_oe property

protected static WebApiContext,Behat\WebApiExtension\Context $webApiContext
Résultat Behat\WebApiExtension\Context\WebApiContext