|
2 | 2 |
|
3 | 3 | declare(strict_types=1); |
4 | 4 |
|
| 5 | +use Temporal\Testing\Command; |
5 | 6 | use Temporal\Testing\Environment; |
6 | 7 | use Temporal\Tests\SearchAttributeTestInvoker; |
7 | 8 | use Temporal\Worker\FeatureFlags; |
8 | 9 |
|
9 | | -chdir(__DIR__ . '/../..'); |
| 10 | +\chdir(__DIR__ . '/../..'); |
10 | 11 | require_once __DIR__ . '/../../vendor/autoload.php'; |
11 | 12 |
|
12 | 13 | $sysInfo = \Temporal\Testing\SystemInfo::detect(); |
13 | 14 |
|
| 15 | +$command = Command::fromEnv(); |
14 | 16 | $environment = Environment::create(); |
15 | 17 | $environment->startTemporalTestServer(); |
16 | | -(new SearchAttributeTestInvoker)(); |
17 | | -$environment->startRoadRunner( |
18 | | - rrCommand: sprintf('%s serve -c .rr.silent.yaml -w tests/Functional', $sysInfo->rrExecutable), |
19 | | -); |
20 | | -register_shutdown_function(fn() => $environment->stop()); |
| 18 | +(new SearchAttributeTestInvoker())(); |
| 19 | +$environment->startRoadRunner(\implode(' ', [ |
| 20 | + $sysInfo->rrExecutable, |
| 21 | + 'serve', |
| 22 | + '-c', '.rr.silent.yaml', |
| 23 | + '-w', 'tests/Functional', |
| 24 | + '-o', |
| 25 | + 'server.command=' . \implode(',', [ |
| 26 | + PHP_BINARY, |
| 27 | + ...$command->getPhpBinaryArguments(), |
| 28 | + 'worker.php', |
| 29 | + ...$command->getCommandLineArguments(), |
| 30 | + ]), |
| 31 | +])); |
| 32 | + |
| 33 | +\register_shutdown_function(static fn() => $environment->stop()); |
21 | 34 |
|
22 | 35 | // Default feature flags |
23 | 36 | FeatureFlags::$warnOnWorkflowUnfinishedHandlers = false; |
0 commit comments