test: add cases for global before/after all hooks

This commit is contained in:
jordanbrauer
2021-04-07 10:52:49 -05:00
parent f21e45ae64
commit 584a7ac8a5
3 changed files with 49 additions and 12 deletions

View File

@ -2,17 +2,19 @@
uses()->group('integration')->in('Visual');
$globalHook = (object) []; // NOTE: global test value container to be mutated and checked across files, as needed
uses()
->beforeEach(function () {
$this->baz = 0;
})
// ->beforeAll(function () {
// dump(0);
// })
->beforeAll(function () use ($globalHook) {
$globalHook->beforeAll = 0;
})
->afterEach(function () {
$this->ith = 0;
})
// ->afterAll(function () {
// dump(0);
// })
->afterAll(function () use ($globalHook) {
$globalHook->afterAll = 0;
})
->in('Hooks');