Files
pest/tests/Features/AfterAll.php
T
nuno maduro cd0e921158 chore: style
2026-07-19 00:42:29 +01:00

22 lines
469 B
PHP

<?php
declare(strict_types=1);
$file = __DIR__.DIRECTORY_SEPARATOR.'after-all-test';
beforeAll(function () use ($file): void {
@unlink($file);
});
afterAll(function () use ($file): void {
@unlink($file);
});
test('deletes file after all', function () use ($file): void {
file_put_contents($file, 'foo');
$this->assertFileExists($file);
register_shutdown_function(function (): void {
// $this->assertFileDoesNotExist($file);
});
});