Skip to content

Proposition::arraySchema()

Jonathan Gjertsen edited this page Jun 18, 2017 · 3 revisions

Syntax

$proposition->given(Proposition::arraySchema[
    'key_1' => $generator_1,
    'key_2' => $generator_2,
    // ...
])

Provides a stream of arrays with the given keys, where the corresponding values are provided by the generators. By letting the generators be e.g. Proposition::arrays() or another Proposotion::arraySchema(), this allows specifying arrays with arbitrary structures.