mirror of
https://github.com/pestphp/pest.git
synced 2026-03-06 07:47:22 +01:00
fix: before each globally
This commit is contained in:
@ -23,7 +23,7 @@
|
||||
"nunomaduro/termwind": "^2.0.1",
|
||||
"pestphp/pest-plugin": "^3.0.0",
|
||||
"pestphp/pest-plugin-arch": "^3.0.0",
|
||||
"phpunit/phpunit": "^11.2.5"
|
||||
"phpunit/phpunit": "^11.2.6"
|
||||
},
|
||||
"conflict": {
|
||||
"sebastian/exporter": "<6.0.0",
|
||||
|
||||
@ -62,12 +62,17 @@ final class BeforeEachCall
|
||||
$testCaseProxies = $this->testCaseProxies;
|
||||
|
||||
$beforeEachTestCall = function (TestCall $testCall) use ($describing): void {
|
||||
|
||||
if ($this->describing !== null) {
|
||||
if ($describing !== $this->describing) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ($describing !== $testCall->describing) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
$this->testCallProxies->chain($testCall);
|
||||
};
|
||||
|
||||
|
||||
@ -197,7 +197,7 @@ final class Coverage
|
||||
};
|
||||
|
||||
$array = [];
|
||||
foreach (array_filter($file->lineCoverageData(), 'is_array') as $line => $tests) {
|
||||
foreach (array_filter($file->lineCoverageData(), is_array(...)) as $line => $tests) {
|
||||
$array = $eachLine($array, $tests, $line);
|
||||
}
|
||||
|
||||
|
||||
@ -1012,6 +1012,7 @@
|
||||
// This is before each runtime note
|
||||
// This is a runtime note
|
||||
✓ nested → it may have static note and runtime note
|
||||
// This is before each static note
|
||||
// This is describe static note
|
||||
// This is a static note within describe
|
||||
// This is before each runtime note
|
||||
@ -1500,4 +1501,4 @@
|
||||
WARN Tests\Visual\Version
|
||||
- visual snapshot of help command output
|
||||
|
||||
Tests: 2 deprecated, 4 warnings, 5 incomplete, 2 notices, 13 todos, 24 skipped, 1057 passed (2588 assertions, 18 notes)
|
||||
Tests: 2 deprecated, 4 warnings, 5 incomplete, 2 notices, 13 todos, 24 skipped, 1057 passed (2588 assertions)
|
||||
Reference in New Issue
Block a user