class FakeBufferedOutput extends BufferedOutput (View source)

internal  
 

Properties

protected array<int, string> $written

The messages written to the output.

protected array{0: int, 1: string}|null $latest

The position and line of the latest expected output that was written.

protected array{0: string, 1: string}|null $outOfOrder

The first expected output written out of order, as [written first, expected first] lines.

Methods

__construct(array $expected = [], array $expectedSubstrings = [], array $unexpected = [], array $unexpectedSubstrings = [], bool|null $expectsOutput = null)

Create a new fake buffered output instance.

void
doWrite(string $message, bool $newline)

Record the given message against the expected output.

string|null
failure()

Get the message for the first unmet output expectation.

Details

__construct(array $expected = [], array $expectedSubstrings = [], array $unexpected = [], array $unexpectedSubstrings = [], bool|null $expectsOutput = null)

Create a new fake buffered output instance.

Parameters

array $expected
array $expectedSubstrings
array $unexpected
array $unexpectedSubstrings
bool|null $expectsOutput

protected void doWrite(string $message, bool $newline)

Record the given message against the expected output.

Parameters

string $message
bool $newline

Return Value

void

string|null failure()

Get the message for the first unmet output expectation.

Return Value

string|null