InteractsWithFakeImages
trait InteractsWithFakeImages
Properties
| protected FakeImageGateway|null | $fakeImageGateway | The fake image gateway instance. |
|
| protected array | $recordedImageGenerations | All of the recorded image generations. |
|
| protected array | $recordedQueuedImageGenerations | All of the recorded image generations that were queued. |
Methods
Assert that an image was generated matching a given truth test.
Assert that an image was not generated matching a given truth test.
Assert that no images were generated.
Assert that a queued image generation was recorded matching a given truth test.
Assert that a queued image generation was not recorded matching a given truth test.
Assert that no queued image generations were recorded.
Determine if image generation is faked.
Get the fake image gateway.
Details
at line 37
FakeImageGateway
fakeImages(Closure|array $responses = [])
Fake image generation.
On the shared manager, the fake gateway affects every request.
at line 48
InteractsWithFakeImages
recordImageGeneration(ImagePrompt|QueuedImagePrompt $prompt)
Record an image generation.
Recorded prompts remain on the worker-shared manager.
at line 63
InteractsWithFakeImages
assertImageGenerated(Closure $callback)
Assert that an image was generated matching a given truth test.
at line 76
InteractsWithFakeImages
assertImageNotGenerated(Closure $callback)
Assert that an image was not generated matching a given truth test.
at line 89
InteractsWithFakeImages
assertNoImagesGenerated()
Assert that no images were generated.
at line 102
InteractsWithFakeImages
assertImageQueued(Closure $callback)
Assert that a queued image generation was recorded matching a given truth test.
at line 115
InteractsWithFakeImages
assertImageNotQueued(Closure $callback)
Assert that a queued image generation was not recorded matching a given truth test.
at line 128
InteractsWithFakeImages
assertNoImagesQueued()
Assert that no queued image generations were recorded.
at line 143
bool
imagesAreFaked()
Determine if image generation is faked.
at line 151
FakeImageGateway|null
fakeImageGateway()
Get the fake image gateway.