mirror of
https://github.com/pestphp/pest.git
synced 2026-03-06 07:47:22 +01:00
fix: before all
This commit is contained in:
16
tests/Hooks/BeforeAllTest.php
Normal file
16
tests/Hooks/BeforeAllTest.php
Normal 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);
|
||||
});
|
||||
Reference in New Issue
Block a user