mirror of
https://github.com/pestphp/pest.git
synced 2026-03-06 07:47:22 +01:00
24 lines
632 B
PHP
24 lines
632 B
PHP
<?php
|
|
|
|
uses()->group('integration')->in('Visual');
|
|
|
|
// NOTE: global test value container to be mutated and checked across files, as needed
|
|
$globalHook = (object) ['calls' => (object) ['beforeAll' => 0, 'afterAll' => 0]];
|
|
|
|
uses()
|
|
->beforeEach(function () {
|
|
$this->baz = 0;
|
|
})
|
|
->beforeAll(function () use ($globalHook) {
|
|
$globalHook->beforeAll = 0;
|
|
$globalHook->calls->beforeAll++;
|
|
})
|
|
->afterEach(function () {
|
|
$this->ith = 0;
|
|
})
|
|
->afterAll(function () use ($globalHook) {
|
|
$globalHook->afterAll = 0;
|
|
$globalHook->calls->afterAll++;
|
|
})
|
|
->in('Hooks');
|