src/Context/ApiContext.php
public function assertResponseBodyJsonArrayMinLength($length) {
        $this->requireResponse();

        $length = (int) $length;
        $body = $this->getResponseBodyArray();

        try {
            Assertion::min(
                $bodyLength = count($body),
                $length,
                sprintf(
                    'Expected response body to be a JSON array with at least %d entr%s, got %d: "%s".',
                    $length,
                    (int) $length === 1 ? 'y' : 'ies',
                    $bodyLength,
                    json_encode($body, JSON_PRETTY_PRINT)
                )
            );
        } catch (AssertionFailure $e) {
            throw new AssertionFailedException($e->getMessage());
        }
    }
public function assertResponseBodyJsonArrayMinLength($length) {
        $this->requireResponse();

        $length = (int) $length;
        $body = $this->getResponseBodyArray();

        try {
            Assertion::min(
                $bodyLength = count($body),
                $length,
                sprintf(
                    'Expected response body to be a JSON array with at least %d entr%s, got %d: "%s".',
                    $length,
                    (int) $length === 1 ? 'y' : 'ies',
                    $bodyLength,
                    json_encode($body, JSON_PRETTY_PRINT)
                )
            );
        } catch (AssertionFailure $e) {
            throw new AssertionFailedException($e->getMessage());
        }
    }
public function assertResponseBodyJsonArrayMinLength ( $ length ) { $ this -> requireResponse ( ) ; $ length = ( int ) $ length ; $ body = $ this -> getResponseBodyArray ( ) ; try { Assertion :: min ( $ bodyLength = count ( $ body ) , $ length , sprintf ( 'Expected response body to be a JSON array with at least %d entr%s, got %d: "%s".' , $ length , ( int ) $ length === 1 ? 'y' : 'ies' , $ bodyLength , json_encode ( $ body , JSON_PRETTY_PRINT ) ) ) ; } catch ( AssertionFailure $ e ) { throw new AssertionFailedException ( $ e -> getMessage ( ) ) ; } }
Assert that the response body contains an array with a length of at least a given length

@param int $length The length to use in the assertion
@throws AssertionFailedException
@return void

@Then the response body is a JSON array with a length of at least :length
Assert that the response body contains an array with a length of at least a given length