mirror of
https://github.com/pestphp/pest.git
synced 2026-03-06 07:47:22 +01:00
Merge pull request #980 from salehhashemi1992/fix/lifecycle-hook-scope
Fix TestCycle hook scope
This commit is contained in:
@ -8,16 +8,16 @@ $foo->beforeEach = false;
|
|||||||
$foo->afterEach = false;
|
$foo->afterEach = false;
|
||||||
$foo->afterAll = false;
|
$foo->afterAll = false;
|
||||||
|
|
||||||
beforeAll(function () {
|
beforeAll(function () use ($foo) {
|
||||||
$foo->beforeAll = true;
|
$foo->beforeAll = true;
|
||||||
});
|
});
|
||||||
beforeEach(function () {
|
beforeEach(function () use ($foo) {
|
||||||
$foo->beforeEach = true;
|
$foo->beforeEach = true;
|
||||||
});
|
});
|
||||||
afterEach(function () {
|
afterEach(function () use ($foo) {
|
||||||
$foo->afterEach = true;
|
$foo->afterEach = true;
|
||||||
});
|
});
|
||||||
afterAll(function () {
|
afterAll(function () use ($foo) {
|
||||||
$foo->afterAll = true;
|
$foo->afterAll = true;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user