summaryrefslogtreecommitdiff
path: root/tests/temporal/Workflow/ActivityStubWorkflow.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/temporal/Workflow/ActivityStubWorkflow.php')
-rw-r--r--tests/temporal/Workflow/ActivityStubWorkflow.php39
1 files changed, 0 insertions, 39 deletions
diff --git a/tests/temporal/Workflow/ActivityStubWorkflow.php b/tests/temporal/Workflow/ActivityStubWorkflow.php
deleted file mode 100644
index 58dcdafb..00000000
--- a/tests/temporal/Workflow/ActivityStubWorkflow.php
+++ /dev/null
@@ -1,39 +0,0 @@
-<?php
-
-namespace Temporal\Tests\Workflow;
-
-use Temporal\Activity\ActivityOptions;
-use Temporal\Tests\Activity\SimpleActivity;
-use Temporal\Workflow;
-use Temporal\Workflow\WorkflowMethod;
-
-#[Workflow\WorkflowInterface]
-class ActivityStubWorkflow
-{
- #[WorkflowMethod(name: 'ActivityStubWorkflow')]
- public function handler(
- string $input
- ) {
- // typed stub
- $simple = Workflow::newActivityStub(
- SimpleActivity::class,
- ActivityOptions::new()->withStartToCloseTimeout(5)
- );
-
- $result = [];
- $result[] = yield $simple->echo($input);
-
- try {
- $simple->undefined($input);
- } catch (\BadMethodCallException $e) {
- $result[] = 'invalid method call';
- }
-
- // untyped stub
- $untyped = Workflow::newUntypedActivityStub(ActivityOptions::new()->withStartToCloseTimeout(1));
-
- $result[] = yield $untyped->execute('SimpleActivity.echo', ['untyped']);
-
- return $result;
- }
-}