WorkflowClientFake
in package
implements
WorkflowClientInterface
FinalYes
Records workflow client interactions and supplies configured test results.
Table of Contents
Interfaces
- WorkflowClientInterface
- The application-facing workflow operations implemented by Client and its test fake.
Properties
- $queries : array<int, array{workflow_id: string, name: string, arguments: list}>
- $queryResults : array<string, mixed>
- $results : array<int, string>
- $signals : array<int, array{workflow_id: string, name: string, arguments: list}>
- $starts : array<int, array{workflow_type: string, workflow_id: string, task_queue: string, input: list}>
- $updateResults : array<string, mixed>
- $updates : array<int, array{workflow_id: string, name: string, arguments: list}>
- $workflowResults : array<string, mixed>
Methods
- assertQueryRequested() : void
- assertResultRequested() : void
- assertSignalSent() : void
- assertUpdateRequested() : void
- assertWorkflowStarted() : void
- query() : mixed
- result() : mixed
- setQueryResult() : self
- setUpdateResult() : self
- setWorkflowResult() : self
- signal() : void
- startWorkflow() : WorkflowHandleInterface
- update() : mixed
- workflowHandle() : WorkflowHandleInterface
- assertInteraction() : void
- configured() : mixed
- key() : string
Properties
$queries
private
array<int, array{workflow_id: string, name: string, arguments: list}>
$queries
= []
$queryResults
private
array<string, mixed>
$queryResults
= []
$results
private
array<int, string>
$results
= []
$signals
private
array<int, array{workflow_id: string, name: string, arguments: list}>
$signals
= []
$starts
private
array<int, array{workflow_type: string, workflow_id: string, task_queue: string, input: list}>
$starts
= []
$updateResults
private
array<string, mixed>
$updateResults
= []
$updates
private
array<int, array{workflow_id: string, name: string, arguments: list}>
$updates
= []
$workflowResults
private
array<string, mixed>
$workflowResults
= []
Methods
assertQueryRequested()
public
assertQueryRequested(string $workflowId, string $name[, array<int, mixed>|null $arguments = null ]) : void
Parameters
- $workflowId : string
- $name : string
- $arguments : array<int, mixed>|null = null
assertResultRequested()
public
assertResultRequested(string $workflowId) : void
Parameters
- $workflowId : string
assertSignalSent()
public
assertSignalSent(string $workflowId, string $name[, array<int, mixed>|null $arguments = null ]) : void
Parameters
- $workflowId : string
- $name : string
- $arguments : array<int, mixed>|null = null
assertUpdateRequested()
public
assertUpdateRequested(string $workflowId, string $name[, array<int, mixed>|null $arguments = null ]) : void
Parameters
- $workflowId : string
- $name : string
- $arguments : array<int, mixed>|null = null
assertWorkflowStarted()
public
assertWorkflowStarted(string $workflowType[, array<int, mixed>|null $input = null ]) : void
Parameters
- $workflowType : string
- $input : array<int, mixed>|null = null
query()
public
query(string $workflowId, string $name, array<int, mixed> $arguments) : mixed
Parameters
- $workflowId : string
- $name : string
- $arguments : array<int, mixed>
result()
public
result(string $workflowId) : mixed
Parameters
- $workflowId : string
setQueryResult()
public
setQueryResult(string $workflowId, string $name, mixed $result) : self
Parameters
- $workflowId : string
- $name : string
- $result : mixed
Return values
selfsetUpdateResult()
public
setUpdateResult(string $workflowId, string $name, mixed $result) : self
Parameters
- $workflowId : string
- $name : string
- $result : mixed
Return values
selfsetWorkflowResult()
public
setWorkflowResult(string $workflowId, mixed $result) : self
Parameters
- $workflowId : string
- $result : mixed
Return values
selfsignal()
public
signal(string $workflowId, string $name, array<int, mixed> $arguments) : void
Parameters
- $workflowId : string
- $name : string
- $arguments : array<int, mixed>
startWorkflow()
public
startWorkflow(string $workflowType, string $workflowId, string $taskQueue[, array<int, mixed> $input = [] ][, int $executionTimeoutSeconds = 3600 ][, int $runTimeoutSeconds = 600 ][, string|null $duplicatePolicy = null ][, array<string|int, mixed>|null $memo = null ][, array<string|int, mixed>|null $searchAttributes = null ][, int|null $priority = null ][, string|null $fairnessKey = null ][, int|null $fairnessWeight = null ][, string|null $buildId = null ]) : WorkflowHandleInterface
Parameters
- $workflowType : string
- $workflowId : string
- $taskQueue : string
- $input : array<int, mixed> = []
- $executionTimeoutSeconds : int = 3600
- $runTimeoutSeconds : int = 600
- $duplicatePolicy : string|null = null
- $memo : array<string|int, mixed>|null = null
- $searchAttributes : array<string|int, mixed>|null = null
- $priority : int|null = null
- $fairnessKey : string|null = null
- $fairnessWeight : int|null = null
- $buildId : string|null = null
Return values
WorkflowHandleInterfaceupdate()
public
update(string $workflowId, string $name, array<int, mixed> $arguments) : mixed
Parameters
- $workflowId : string
- $name : string
- $arguments : array<int, mixed>
workflowHandle()
public
workflowHandle(string $workflowId[, string|null $selectedRunId = null ]) : WorkflowHandleInterface
Parameters
- $workflowId : string
- $selectedRunId : string|null = null
Return values
WorkflowHandleInterfaceassertInteraction()
private
assertInteraction(array<int, array{workflow_id: string, name: string, arguments: list}> $interactions, string $kind, string $workflowId, string $name, array<int, mixed>|null $arguments) : void
Parameters
- $interactions : array<int, array{workflow_id: string, name: string, arguments: list}>
- $kind : string
- $workflowId : string
- $name : string
- $arguments : array<int, mixed>|null
configured()
private
configured(array<string, mixed> $configured, string $workflowId, string $name, string $kind) : mixed
Parameters
- $configured : array<string, mixed>
- $workflowId : string
- $name : string
- $kind : string
key()
private
key(string $workflowId, string $name) : string
Parameters
- $workflowId : string
- $name : string