Skip to content

Commit

Permalink
Merge pull request #49 from rezzza/tyx-patch-1
Browse files Browse the repository at this point in the history
Asserter to arrayNode not contain value
  • Loading branch information
tyx committed Jun 8, 2016
2 parents 6d439a2 + 389eabe commit 6e0a89c
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/Json/JsonContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,16 @@ public function theJsonArrayNodeShouldContainElements($jsonNode, $expectedValue)

$this->asserter->phpArray($realValue)->contains($expectedValue);
}

/**
* @Then /^the JSON array node "(?P<jsonNode>[^"]*)" should not contain "(?P<expectedValue>.*)" element$/
*/
public function theJsonArrayNodeShouldNotContainElements($jsonNode, $expectedValue)
{
$realValue = $this->evaluateJsonNodeValue($jsonNode);

$this->asserter->phpArray($realValue)->notContains($expectedValue);
}

/**
* @Then /^the JSON node "(?P<jsonNode>[^"]*)" should contain "(?P<expectedValue>.*)"$/
Expand Down

0 comments on commit 6e0a89c

Please sign in to comment.