Skip to content
This repository was archived by the owner on Apr 20, 2021. It is now read-only.

Commit 175f623

Browse files
committed
Add theJsonNodeShouldNotBeNull method to JsonContext.
1 parent f9c0093 commit 175f623

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

src/Context/JsonContext.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,18 @@ public function theJsonNodeShouldBeNull($node)
9393
}
9494
}
9595

96+
/**
97+
* Checks, that given JSON node is not null.
98+
*
99+
* @Then the JSON node :node should not be null
100+
*/
101+
public function theJsonNodeShouldNotBeNull($name)
102+
{
103+
$this->not(function () use ($name) {
104+
return $this->theJsonNodeShouldBeNull($name);
105+
}, sprintf('The node %s should not be null', $name));
106+
}
107+
96108
/**
97109
* Checks, that given JSON node is true
98110
*

0 commit comments

Comments
 (0)