fix lifecycle hook scope

This commit is contained in:
salehhashemi1992
2023-10-13 17:51:02 +03:30
parent b126e8e6e4
commit 7249b59e52

View File

@ -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;
}); });