trait InteractsWithFakeClassification

Properties

protected FakeClassificationGateway|null $fakeClassificationGateway

The fake classification gateway instance.

protected array $recordedClassifications

All of the recorded classifications.

Methods

fakeClassification(Closure|array $responses = [])

Fake classification operations.

assertClassified(Closure $callback)

Assert that a classification was performed matching a given truth test.

assertNotClassified(Closure $callback)

Assert that a classification was not performed matching a given truth test.

assertNothingClassified()

Assert that no classifications were performed.

bool
classificationIsFaked()

Determine if classification is faked.

fakeClassificationGateway()

Get the fake classification gateway.

Details

at line 31
FakeClassificationGateway fakeClassification(Closure|array $responses = [])

Fake classification operations.

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

Parameters

Closure|array $responses

Return Value

FakeClassificationGateway

at line 42
InteractsWithFakeClassification recordClassification(ClassificationPrompt $prompt)

Record a classification.

Recorded prompts remain on the worker-shared manager.

Parameters

ClassificationPrompt $prompt

Return Value

InteractsWithFakeClassification

at line 53
InteractsWithFakeClassification assertClassified(Closure $callback)

Assert that a classification was performed matching a given truth test.

Parameters

Closure $callback

Return Value

InteractsWithFakeClassification

at line 66
InteractsWithFakeClassification assertNotClassified(Closure $callback)

Assert that a classification was not performed matching a given truth test.

Parameters

Closure $callback

Return Value

InteractsWithFakeClassification

at line 79
InteractsWithFakeClassification assertNothingClassified()

Assert that no classifications were performed.

at line 94
bool classificationIsFaked()

Determine if classification is faked.

Return Value

bool

at line 102
FakeClassificationGateway|null fakeClassificationGateway()

Get the fake classification gateway.

Return Value

FakeClassificationGateway|null