Skip to content

Commit c136f7f

Browse files
committed
Fix test runner
1 parent 6eadea0 commit c136f7f

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

tests/Acceptance/bootstrap.php

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,11 @@
3838
'Temporal\Tests\Acceptance\Extra' => __DIR__ . '/Extra',
3939
]);
4040

41-
$runner = new RRStarter($runtime);
42-
4341
# Run RoadRunner and Temporal
44-
(new TemporalStarter())->start();
45-
$runner->start();
42+
$temporalRunner = new TemporalStarter();
43+
$rrRunner = new RRStarter($runtime);
44+
$temporalRunner->start();
45+
$rrRunner->start();
4646

4747
# Prepare and run checks
4848

@@ -84,7 +84,8 @@
8484

8585
ContainerFacade::$container = $container = new Spiral\Core\Container();
8686
$container->bindSingleton(State::class, $runtime);
87-
$container->bindSingleton(RRStarter::class, $runner);
87+
$container->bindSingleton(RRStarter::class, $rrRunner);
88+
$container->bindSingleton(TemporalStarter::class, $temporalRunner);
8889
$container->bindSingleton(ServiceClientInterface::class, $serviceClient);
8990
$container->bindSingleton(WorkflowClientInterface::class, $workflowClient);
9091
$container->bindSingleton(ScheduleClientInterface::class, $scheduleClient);

tests/bootstrap.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22

33
declare(strict_types=1);
44

5-
chdir(__DIR__ . '/..');
5+
\chdir(__DIR__ . '/..');
66
require_once 'vendor/autoload.php';
77

88
# Detect test suite or concrete test class to run
99
$suite = (static function (array $argv): ?string {
10-
$string = implode(' ', $argv);
10+
$string = \implode(' ', $argv);
1111

1212
# Check `--testsuite` parameter with quotes and without quotes
1313
if (\preg_match('/--testsuite(?:=|\s++)([^"\']\S++|\'[^\']*+\'|"[^\']*+")/', $string, $matches)) {
@@ -16,7 +16,7 @@
1616

1717
# Check --filter parameter
1818
if (\preg_match('/--filter(?:=|\s++)([^"\']\S++|\'[^\']*+\'|"[^\']*+")/', $string, $matches)) {
19-
$filter = str_replace('\\\\', '\\', \trim($matches[1], '\'"'));
19+
$filter = \str_replace('\\\\', '\\', \trim($matches[1], '\'"'));
2020
if (\preg_match('/Temporal\\\\Tests\\\\(\\w+)\\\\/', $filter, $matches)) {
2121
return $matches[1];
2222
}

0 commit comments

Comments
 (0)