PHP Class Sanpi\Behatch\Context\JsonContext

Inheritance: extends BaseContext
Exibir arquivo Open project: behatch/contexts Class Usage Examples

Protected Properties

Property Type Description
$httpCallResultPool
$inspector

Public Methods

Method Description
__construct ( HttpCallResultPool $httpCallResultPool, $evaluationMode = 'javascript' )
printLastJsonResponse ( )
theJsonNodeShouldBeEqualTo ( $node, $text ) Checks, that given JSON node is equal to given value
theJsonNodeShouldBeEqualToTheNumber ( $node, $number ) Checks, that given JSON node is equal to the given number
theJsonNodeShouldBeEqualToTheString ( $node, $text ) Checks, that given JSON node is equal to the given string
theJsonNodeShouldBeFalse ( $node ) Checks, that given JSON node is false
theJsonNodeShouldBeNull ( $node ) Checks, that given JSON node is null
theJsonNodeShouldBeTrue ( $node ) Checks, that given JSON node is true
theJsonNodeShouldContain ( $node, $text ) Checks, that given JSON node contains given value
theJsonNodeShouldExist ( $name ) Checks, that given JSON node exist
theJsonNodeShouldHaveElements ( $node, $count ) Checks, that given JSON node has N element(s)
theJsonNodeShouldNotBeNull ( $name ) Checks, that given JSON node is not null.
theJsonNodeShouldNotContain ( $node, $text ) Checks, that given JSON node does not contain given value
theJsonNodeShouldNotExist ( $name ) Checks, that given JSON node does not exist
theJsonNodesShoudBeEqualTo ( Behat\Gherkin\Node\TableNode $nodes ) Checks, that given JSON nodes are equal to givens values
theJsonNodesShoudContain ( Behat\Gherkin\Node\TableNode $nodes ) Checks, that given JSON nodes contains values
theJsonNodesShoudNotContain ( Behat\Gherkin\Node\TableNode $nodes ) Checks, that given JSON nodes does not contain given value
theJsonShouldBeEqualTo ( Behat\Gherkin\Node\PyStringNode $content )
theJsonShouldBeInvalidAccordingToTheSchema ( $filename )
theJsonShouldBeValidAccordingToTheSchema ( $filename )
theJsonShouldBeValidAccordingToThisSchema ( Behat\Gherkin\Node\PyStringNode $schema )
theResponseShouldBeInJson ( ) Checks, that the response is correct JSON
theResponseShouldNotBeInJson ( ) Checks, that the response is not correct JSON

Protected Methods

Method Description
getJson ( )

Private Methods

Method Description
checkSchemaFile ( $filename )

Method Details

__construct() public method

public __construct ( HttpCallResultPool $httpCallResultPool, $evaluationMode = 'javascript' )
$httpCallResultPool Sanpi\Behatch\HttpCall\HttpCallResultPool

getJson() protected method

protected getJson ( )

printLastJsonResponse() public method

theJsonNodeShouldBeEqualTo() public method

Checks, that given JSON node is equal to given value
public theJsonNodeShouldBeEqualTo ( $node, $text )

theJsonNodeShouldBeEqualToTheNumber() public method

Checks, that given JSON node is equal to the given number
public theJsonNodeShouldBeEqualToTheNumber ( $node, $number )

theJsonNodeShouldBeEqualToTheString() public method

Checks, that given JSON node is equal to the given string
public theJsonNodeShouldBeEqualToTheString ( $node, $text )

theJsonNodeShouldBeFalse() public method

Checks, that given JSON node is false
public theJsonNodeShouldBeFalse ( $node )

theJsonNodeShouldBeNull() public method

Checks, that given JSON node is null
public theJsonNodeShouldBeNull ( $node )

theJsonNodeShouldBeTrue() public method

Checks, that given JSON node is true
public theJsonNodeShouldBeTrue ( $node )

theJsonNodeShouldContain() public method

Checks, that given JSON node contains given value
public theJsonNodeShouldContain ( $node, $text )

theJsonNodeShouldExist() public method

Checks, that given JSON node exist
public theJsonNodeShouldExist ( $name )

theJsonNodeShouldHaveElements() public method

Checks, that given JSON node has N element(s)
public theJsonNodeShouldHaveElements ( $node, $count )

theJsonNodeShouldNotBeNull() public method

Checks, that given JSON node is not null.
public theJsonNodeShouldNotBeNull ( $name )

theJsonNodeShouldNotContain() public method

Checks, that given JSON node does not contain given value
public theJsonNodeShouldNotContain ( $node, $text )

theJsonNodeShouldNotExist() public method

Checks, that given JSON node does not exist
public theJsonNodeShouldNotExist ( $name )

theJsonNodesShoudBeEqualTo() public method

Checks, that given JSON nodes are equal to givens values
public theJsonNodesShoudBeEqualTo ( Behat\Gherkin\Node\TableNode $nodes )
$nodes Behat\Gherkin\Node\TableNode

theJsonNodesShoudContain() public method

Checks, that given JSON nodes contains values
public theJsonNodesShoudContain ( Behat\Gherkin\Node\TableNode $nodes )
$nodes Behat\Gherkin\Node\TableNode

theJsonNodesShoudNotContain() public method

Checks, that given JSON nodes does not contain given value
public theJsonNodesShoudNotContain ( Behat\Gherkin\Node\TableNode $nodes )
$nodes Behat\Gherkin\Node\TableNode

theJsonShouldBeEqualTo() public method

public theJsonShouldBeEqualTo ( Behat\Gherkin\Node\PyStringNode $content )
$content Behat\Gherkin\Node\PyStringNode

theJsonShouldBeInvalidAccordingToTheSchema() public method

theJsonShouldBeValidAccordingToTheSchema() public method

theJsonShouldBeValidAccordingToThisSchema() public method

public theJsonShouldBeValidAccordingToThisSchema ( Behat\Gherkin\Node\PyStringNode $schema )
$schema Behat\Gherkin\Node\PyStringNode

theResponseShouldBeInJson() public method

Checks, that the response is correct JSON

theResponseShouldNotBeInJson() public method

Checks, that the response is not correct JSON

Property Details

$httpCallResultPool protected_oe property

protected $httpCallResultPool

$inspector protected_oe property

protected $inspector