fix: before all

This commit is contained in:
Nuno Maduro
2025-07-25 20:54:37 -06:00
parent 6d6e4e040f
commit de4409e368
6 changed files with 34 additions and 7 deletions

View File

@ -0,0 +1,16 @@
<?php
pest()->beforeAll(function () {
expect($_SERVER['globalHook']->calls->beforeAll)
->toBe(0);
$_SERVER['globalHook']->calls->beforeAll++;
});
it('gets called before all tests 1', function () {
expect($_SERVER['globalHook']->calls->beforeAll)->toBe(1);
})->repeat(2);
it('gets called before all tests 2', function () {
expect($_SERVER['globalHook']->calls->beforeAll)->toBe(1);
});