src/Context/ApiContext.php
public function assertResponseBodyIsAnEmptyJsonObject() {
        $this->requireResponse();
        $body = $this->getResponseBody();

        try {
            Assertion::isInstanceOf($body, 'stdClass', 'Expected response body to be a JSON object.');
            Assertion::same('{}', $encoded = json_encode($body, JSON_PRETTY_PRINT), sprintf(
                'Expected response body to be an empty JSON object, got "%s".',
                $encoded
            ));
        } catch (AssertionFailure $e) {
            throw new AssertionFailedException($e->getMessage());
        }
    }
public function assertResponseBodyIsAnEmptyJsonObject() {
        $this->requireResponse();
        $body = $this->getResponseBody();

        try {
            Assertion::isInstanceOf($body, 'stdClass', 'Expected response body to be a JSON object.');
            Assertion::same('{}', $encoded = json_encode($body, JSON_PRETTY_PRINT), sprintf(
                'Expected response body to be an empty JSON object, got "%s".',
                $encoded
            ));
        } catch (AssertionFailure $e) {
            throw new AssertionFailedException($e->getMessage());
        }
    }
public function assertResponseBodyIsAnEmptyJsonObject ( ) { $ this -> requireResponse ( ) ; $ body = $ this -> getResponseBody ( ) ; try { Assertion :: isInstanceOf ( $ body , 'stdClass' , 'Expected response body to be a JSON object.' ) ; Assertion :: same ( '{}' , $ encoded = json_encode ( $ body , JSON_PRETTY_PRINT ) , sprintf ( 'Expected response body to be an empty JSON object, got "%s".' , $ encoded ) ) ; } catch ( AssertionFailure $ e ) { throw new AssertionFailedException ( $ e -> getMessage ( ) ) ; } }
Assert that the response body contains an empty JSON object

@throws AssertionFailedException
@return void

@Then the response body is an empty JSON object
Assert that the response body contains an empty JSON object