FakesInputOutput
trait FakesInputOutput
Methods
Fake the terminal and queue key presses to be simulated.
Implementation of the looping mechanism for simulating key presses.
Assert that the output contains the given string.
Assert that the output doesn't contain the given string.
Assert that the stripped output contains the given string.
Assert that the stripped output doesn't contain the given string.
Get the buffered console output.
Get the buffered console output, stripped of escape sequences.
Details
at line 25
static void
fake(array $keys = [])
Fake the terminal and queue key presses to be simulated.
Swaps prompt terminal and output state for the worker lifetime.
at line 63
static void
fakeKeyPresses(array $keys, callable $callable)
Implementation of the looping mechanism for simulating key presses.
By ignoring the $callable parameter which contains the default logic
for simulating fake key presses, we can use a custom implementation
to emit key presses instead, allowing us to use different inputs.
at line 73
static void
assertOutputContains(string $string)
Assert that the output contains the given string.
at line 81
static void
assertOutputDoesntContain(string $string)
Assert that the output doesn't contain the given string.
at line 89
static void
assertStrippedOutputContains(string $string)
Assert that the stripped output contains the given string.
at line 97
static void
assertStrippedOutputDoesntContain(string $string)
Assert that the stripped output doesn't contain the given string.
at line 105
static string
content()
Get the buffered console output.
at line 117
static string
strippedContent()
Get the buffered console output, stripped of escape sequences.