Durable Workflow PHP SDK — API Reference

Guides

WorkerTestHarness
in package

FinalYes

Executes and asserts registered worker handlers without polling a server.

Table of Contents

Properties

$contextClient  : Client
$replayer  : Replayer
$worker  : Worker

Methods

__construct()  : mixed
assertActivityResult()  : void
assertQueryResult()  : void
assertRegistered()  : void
assertUpdateResult()  : void
assertWorkflowEmits()  : void
runActivity()  : mixed
runQuery()  : mixed
runUpdate()  : mixed
runWorkflow()  : ReplayResult
assertSame()  : void
queryContext()  : QueryContext

Properties

Methods

assertActivityResult()

public assertActivityResult(string $activityType, mixed $expected[, array<int, mixed> $arguments = [] ]) : void
Parameters
$activityType : string
$expected : mixed
$arguments : array<int, mixed> = []

assertQueryResult()

public assertQueryResult(string $workflowType, string $queryName, mixed $expected[, array<int, mixed> $arguments = [] ]) : void
Parameters
$workflowType : string
$queryName : string
$expected : mixed
$arguments : array<int, mixed> = []

assertRegistered()

public assertRegistered(string $kind, string $name[, string|null $workflowType = null ]) : void
Parameters
$kind : string
$name : string
$workflowType : string|null = null

assertUpdateResult()

public assertUpdateResult(string $workflowType, string $updateName, mixed $expected[, array<int, mixed> $arguments = [] ]) : void
Parameters
$workflowType : string
$updateName : string
$expected : mixed
$arguments : array<int, mixed> = []

assertWorkflowEmits()

public assertWorkflowEmits(string $workflowType, string $commandType[, array<int, mixed> $input = [] ]) : void
Parameters
$workflowType : string
$commandType : string
$input : array<int, mixed> = []

runActivity()

public runActivity(string $activityType[, array<int, mixed> $arguments = [] ]) : mixed
Parameters
$activityType : string
$arguments : array<int, mixed> = []

runQuery()

public runQuery(string $workflowType, string $queryName[, array<int, mixed> $arguments = [] ][, array<int, array<string, mixed>> $history = [] ]) : mixed
Parameters
$workflowType : string
$queryName : string
$arguments : array<int, mixed> = []
$history : array<int, array<string, mixed>> = []

runUpdate()

public runUpdate(string $workflowType, string $updateName[, array<int, mixed> $arguments = [] ][, array<int, array<string, mixed>> $history = [] ]) : mixed
Parameters
$workflowType : string
$updateName : string
$arguments : array<int, mixed> = []
$history : array<int, array<string, mixed>> = []

runWorkflow()

public runWorkflow(string $workflowType[, array<int, mixed> $input = [] ][, array<int, array<string, mixed>> $history = [] ][, array<string, mixed> $task = [] ]) : ReplayResult
Parameters
$workflowType : string
$input : array<int, mixed> = []
$history : array<int, array<string, mixed>> = []
$task : array<string, mixed> = []
Return values
ReplayResult

assertSame()

private assertSame(mixed $expected, mixed $actual, string $contract) : void
Parameters
$expected : mixed
$actual : mixed
$contract : string

queryContext()

private queryContext(string $workflowType, array<int, array<string, mixed>> $history) : QueryContext
Parameters
$workflowType : string
$history : array<int, array<string, mixed>>
Return values
QueryContext
On this page

Search results