Skip to content

Commit c94cea4

Browse files
committed
wip
1 parent 7432e87 commit c94cea4

4 files changed

Lines changed: 18 additions & 15 deletions

File tree

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@
3939
}
4040
},
4141
"scripts": {
42-
"lint": "pint",
43-
"test:lint": "pint --test",
42+
"lint": "pint --parallel",
43+
"test:lint": "pint --parallel --test",
4444
"test:unit": "pest",
4545
"test": [
4646
"@test:lint",

phpunit.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,7 @@
3232
<directory suffix=".php">./tests/Fixtures</directory>
3333
</include>
3434
</source>
35+
<php>
36+
<env name="__PEST_PLUGIN_ENV" value="testing"/>
37+
</php>
3538
</phpunit>

src/Analyser.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ private static function analyseChunks(
105105
if ($useAsync === false) {
106106
pokio()->useSync();
107107
} else {
108-
if (Environment::supportsFork()) {
108+
if (Environment::supportsFork() && ! isset($_ENV['__PEST_PLUGIN_ENV'])) {
109109
pokio()->useFork();
110110
}
111111
}

tests/Plugin.php

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ public function exit(int $code): never
1919
expect(fn () => $plugin->handleOriginalArguments(['--type-coverage', '--no-cache']))->toThrow(Exception::class, 0)
2020
->and($output->fetch())->toContain(
2121
'.. 100%',
22-
'.. pr12 87',
23-
'.. co14, pr16, pa18, pa18, rt18 12',
24-
'.. co14 87',
22+
'.. pr12 75',
23+
'.. co14, pr16, pa18, pa18, rt18 0',
24+
'.. co14 75',
2525
'.. rt12 75',
26-
'.. pa12 87',
26+
'.. pa12 75',
2727
);
2828
});
2929

@@ -40,11 +40,11 @@ public function exit(int $code): never
4040
expect(fn () => $plugin->handleOriginalArguments(['--type-coverage']))->toThrow(Exception::class, 0)
4141
->and($output->fetch())->toContain(
4242
'.. 100%',
43-
'.. pr12 87',
44-
'.. co14, pr16, pa18, pa18, rt18 12',
45-
'.. co14 87',
43+
'.. pr12 75',
44+
'.. co14, pr16, pa18, pa18, rt18 0',
45+
'.. co14 75',
4646
'.. rt12 75',
47-
'.. pa12 87',
47+
'.. pa12 75',
4848
);
4949
});
5050

@@ -60,11 +60,11 @@ public function exit(int $code): never
6060

6161
expect(fn () => $plugin->handleOriginalArguments(['--type-coverage', '--compact']))->toThrow(Exception::class, 0)
6262
->and($output->fetch())->toContain(
63-
'.. pr12 87',
64-
'.. co14, pr16, pa18, pa18, rt18 12',
65-
'.. co14 87',
63+
'.. pr12 75',
64+
'.. co14, pr16, pa18, pa18, rt18 0',
65+
'.. co14 75',
6666
'.. rt12 75',
67-
'.. pa12 87',
67+
'.. pa12 75',
6868
)->not->toContain('.. 100%');
6969
});
7070

0 commit comments

Comments
 (0)