Files
pest/tests/Features/TestCycle.php
Nuno Maduro 45cce6ce93 Style
2024-07-24 21:54:52 +01:00

30 lines
635 B
PHP

<?php
use function PHPUnit\Framework\assertFalse;
$foo = new stdClass;
$foo->beforeAll = false;
$foo->beforeEach = false;
$foo->afterEach = false;
$foo->afterAll = false;
beforeAll(function () use ($foo) {
$foo->beforeAll = true;
});
beforeEach(function () use ($foo) {
$foo->beforeEach = true;
});
afterEach(function () use ($foo) {
$foo->afterEach = true;
});
afterAll(function () use ($foo) {
$foo->afterAll = true;
});
register_shutdown_function(function () use ($foo) {
assertFalse($foo->beforeAll);
assertFalse($foo->beforeEach);
assertFalse($foo->afterEach);
assertFalse($foo->afterAll);
});