mirror of
https://github.com/pestphp/pest.git
synced 2026-07-21 17:10:03 +02:00
22 lines
469 B
PHP
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);
|
|
});
|
|
});
|