TraceableTransport

Playwright\Transport\TraceableTransport

Decorator transport that records every interaction with the inner transport. Useful in unit tests for asserting on payloads without stubbing behaviour.

implements TransportInterface

Methods

__construct()

function __construct(private readonly TransportInterface $decorated)

connect()

void
function connect(): void

disconnect()

void
function disconnect(): void

send()

array
function send(array $message): array

sendAsync()

void
function sendAsync(array $message): void

isConnected()

bool
function isConnected(): bool

processEvents()

void
function processEvents(): void

reset()

void

Reset all recorded call history.

function reset(): void

getSendCalls()

array
function getSendCalls(): array

getAsyncCalls()

array
function getAsyncCalls(): array

getProcessEventsCalls()

array
function getProcessEventsCalls(): array

getConnectionCalls()

array
function getConnectionCalls(): array