summaryrefslogtreecommitdiff
path: root/tests/plugins/temporal/worker.php
diff options
context:
space:
mode:
authorValery Piashchynski <[email protected]>2021-01-27 13:56:28 +0300
committerValery Piashchynski <[email protected]>2021-01-27 13:56:28 +0300
commit744c2b0c86b88f77e681f8660bf3a476e83711b8 (patch)
treef7af7d7d494d1f5ca272af1ad0b978fe44d685a9 /tests/plugins/temporal/worker.php
parente2266b80db47444ba5858c736833a8a81b1361ad (diff)
Move temporal plugin to the temporal repository
Diffstat (limited to 'tests/plugins/temporal/worker.php')
-rw-r--r--tests/plugins/temporal/worker.php33
1 files changed, 0 insertions, 33 deletions
diff --git a/tests/plugins/temporal/worker.php b/tests/plugins/temporal/worker.php
deleted file mode 100644
index 0d0263e7..00000000
--- a/tests/plugins/temporal/worker.php
+++ /dev/null
@@ -1,33 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-require __DIR__ . '/../../vendor/autoload.php';
-
-/**
- * @param string $dir
- * @return array<string>
- */
-$getClasses = static function (string $dir): iterable {
- $files = glob($dir . '/*.php');
-
- foreach ($files as $file) {
- yield substr(basename($file), 0, -4);
- }
-};
-
-$factory = \Temporal\WorkerFactory::create();
-
-$worker = $factory->newWorker('default');
-
-// register all workflows
-foreach ($getClasses(__DIR__ . '/../../temporal/Workflow') as $name) {
- $worker->registerWorkflowType('Temporal\\Tests\\Workflow\\' . $name);
-}
-
-// register all activity
-foreach ($getClasses(__DIR__ . '/../../temporal/Activity') as $name) {
- $worker->registerActivityType('Temporal\\Tests\\Activity\\' . $name);
-}
-
-$factory->run();