mirror of
https://github.com/pestphp/pest.git
synced 2026-03-12 10:47:25 +01:00
WIP
This commit is contained in:
committed by
Nuno Maduro
parent
b7ec3c59b8
commit
7fe7a01d43
@ -1,11 +1,12 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
use Pest\Plugins\Parallel;
|
||||||
use Pest\Support\Str;
|
use Pest\Support\Str;
|
||||||
|
|
||||||
// HACK: we have to determine our $_SERVER['globalHook-]>calls baseline. This is because
|
// HACK: we have to determine our $_SERVER['globalHook-]>calls baseline. This is because
|
||||||
// two other tests are executed before this one due to filename ordering.
|
// two other tests are executed before this one due to filename ordering.
|
||||||
$args = $_SERVER['argv'] ?? [];
|
$args = $_SERVER['argv'] ?? [];
|
||||||
$single = (isset($args[1]) && Str::endsWith(__FILE__, $args[1])) || ($_SERVER['PEST_PARALLEL'] ?? false);
|
$single = (isset($args[1]) && Str::endsWith(__FILE__, $args[1])) || Parallel::isInParallelProcess();
|
||||||
$offset = $single ? 0 : 2;
|
$offset = $single ? 0 : 2;
|
||||||
|
|
||||||
uses()->beforeAll(function () use ($offset) {
|
uses()->beforeAll(function () use ($offset) {
|
||||||
|
|||||||
Reference in New Issue
Block a user