Sanpi\Behatch\Context\RestContext::theResponseShouldBeEqualTo PHP Method

theResponseShouldBeEqualTo() public method

Checks, whether the response content is equal to given text
public theResponseShouldBeEqualTo ( Behat\Gherkin\Node\PyStringNode $expected )
$expected Behat\Gherkin\Node\PyStringNode
    public function theResponseShouldBeEqualTo(PyStringNode $expected)
    {
        $expected = str_replace('\\"', '"', $expected);
        $actual = $this->request->getContent();
        $message = "The string '{$expected}' is not equal to the response of the current page";
        $this->assertEquals($expected, $actual, $message);
    }