trait InteractsWithFakeAudio

Properties

protected FakeAudioGateway|null $fakeAudioGateway

The fake audio gateway instance.

protected array $recordedAudioGenerations

All of the recorded audio generations.

protected array $recordedQueuedAudioGenerations

All of the recorded audio generations that were queued.

Methods

fakeAudio(Closure|array $responses = [])

Fake audio generation.

assertAudioGenerated(Closure $callback)

Assert that audio was generated matching a given truth test.

assertAudioNotGenerated(Closure $callback)

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

assertNoAudioGenerated()

Assert that no audio was generated.

assertAudioQueued(Closure $callback)

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

assertAudioNotQueued(Closure $callback)

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

assertNoAudioQueued()

Assert that no queued audio generations were recorded.

bool
audioIsFaked()

Determine if audio generation is faked.

fakeAudioGateway()

Get the fake audio gateway.

Details

at line 37
FakeAudioGateway fakeAudio(Closure|array $responses = [])

Fake audio generation.

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

Parameters

Closure|array $responses

Return Value

FakeAudioGateway

at line 48
InteractsWithFakeAudio recordAudioGeneration(AudioPrompt|QueuedAudioPrompt $prompt)

Record an audio generation.

Recorded prompts remain on the worker-shared manager.

Parameters

AudioPrompt|QueuedAudioPrompt $prompt

Return Value

InteractsWithFakeAudio

at line 63
InteractsWithFakeAudio assertAudioGenerated(Closure $callback)

Assert that audio was generated matching a given truth test.

Parameters

Closure $callback

Return Value

InteractsWithFakeAudio

at line 76
InteractsWithFakeAudio assertAudioNotGenerated(Closure $callback)

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

Parameters

Closure $callback

Return Value

InteractsWithFakeAudio

at line 89
InteractsWithFakeAudio assertNoAudioGenerated()

Assert that no audio was generated.

Return Value

InteractsWithFakeAudio

at line 102
InteractsWithFakeAudio assertAudioQueued(Closure $callback)

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

Parameters

Closure $callback

Return Value

InteractsWithFakeAudio

at line 115
InteractsWithFakeAudio assertAudioNotQueued(Closure $callback)

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

Parameters

Closure $callback

Return Value

InteractsWithFakeAudio

at line 128
InteractsWithFakeAudio assertNoAudioQueued()

Assert that no queued audio generations were recorded.

Return Value

InteractsWithFakeAudio

at line 143
bool audioIsFaked()

Determine if audio generation is faked.

Return Value

bool

at line 151
FakeAudioGateway|null fakeAudioGateway()

Get the fake audio gateway.

Return Value

FakeAudioGateway|null