Skip to content

Proposition::accidents()

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

Syntax

$proposition->given(Proposition::accidents())

Provides a stream of "invalid" values that a function will typically return if something is wrong, good for handling common failure modes. These values are:

  • null
  • false
  • true
  • 0
  • "0"
  • []
  • ""
  • empty object