trait InteractsWithFakeTranscriptions

Properties

protected FakeTranscriptionGateway|null $fakeTranscriptionGateway

The fake transcription gateway instance.

protected array $recordedTranscriptionGenerations

All of the recorded transcription generations.

protected array $recordedQueuedTranscriptionGenerations

All of the recorded transcription generations that were queued.

Methods

fakeTranscriptions(Closure|array $responses = [])

Fake transcription generation.

assertTranscriptionGenerated(Closure $callback)

Assert that a transcription was generated matching a given truth test.

assertTranscriptionNotGenerated(Closure $callback)

Assert that a transcription was not generated matching a given truth test.

assertNoTranscriptionsGenerated()

Assert that no transcriptions were generated.

assertTranscriptionQueued(Closure $callback)

Assert that a queued transcription generation was recorded matching a given truth test.

assertTranscriptionNotQueued(Closure $callback)

Assert that a queued transcription generation was not recorded matching a given truth test.

assertNoTranscriptionsQueued()

Assert that no queued transcription generations were recorded.

bool
transcriptionsAreFaked()

Determine if transcription generation is faked.

fakeTranscriptionGateway()

Get the fake transcription gateway.

Details

at line 37
FakeTranscriptionGateway fakeTranscriptions(Closure|array $responses = [])

Fake transcription generation.

On the shared manager, the fake gateway affects every request.

Parameters

Closure|array $responses

Return Value

FakeTranscriptionGateway

at line 48
InteractsWithFakeTranscriptions recordTranscriptionGeneration(TranscriptionPrompt|QueuedTranscriptionPrompt $prompt)

Record a transcription generation.

Recorded prompts remain on the worker-shared manager.

at line 63
InteractsWithFakeTranscriptions assertTranscriptionGenerated(Closure $callback)

Assert that a transcription was generated matching a given truth test.

Parameters

Closure $callback

Return Value

InteractsWithFakeTranscriptions

at line 76
InteractsWithFakeTranscriptions assertTranscriptionNotGenerated(Closure $callback)

Assert that a transcription was not generated matching a given truth test.

Parameters

Closure $callback

Return Value

InteractsWithFakeTranscriptions

at line 89
InteractsWithFakeTranscriptions assertNoTranscriptionsGenerated()

Assert that no transcriptions were generated.

at line 102
InteractsWithFakeTranscriptions assertTranscriptionQueued(Closure $callback)

Assert that a queued transcription generation was recorded matching a given truth test.

Parameters

Closure $callback

Return Value

InteractsWithFakeTranscriptions

at line 115
InteractsWithFakeTranscriptions assertTranscriptionNotQueued(Closure $callback)

Assert that a queued transcription generation was not recorded matching a given truth test.

Parameters

Closure $callback

Return Value

InteractsWithFakeTranscriptions

at line 128
InteractsWithFakeTranscriptions assertNoTranscriptionsQueued()

Assert that no queued transcription generations were recorded.

at line 143
bool transcriptionsAreFaked()

Determine if transcription generation is faked.

Return Value

bool

at line 151
FakeTranscriptionGateway|null fakeTranscriptionGateway()

Get the fake transcription gateway.

Return Value

FakeTranscriptionGateway|null