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

16 lines
353 B
PHP

<?php
$file = __DIR__ . DIRECTORY_SEPARATOR . 'after-all-test';
afterAll(function () use ($file) {
unlink($file);
});
test('deletes file after all', function () use ($file) {
file_put_contents($file, 'foo');
assertFileExists($file);
register_shutdown_function(function () use ($file) {
assertFileNotExists($file);
});
});