Files
pest/tests/Features/TestCycle.php
Nuno Maduro de2929077b first
2020-05-11 18:38:30 +02:00

28 lines
564 B
PHP

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