mirror of
https://github.com/pestphp/pest.git
synced 2026-03-06 15:57:21 +01:00
20 lines
423 B
PHP
20 lines
423 B
PHP
<?php
|
|
|
|
$file = __DIR__ . DIRECTORY_SEPARATOR . 'after-all-test';
|
|
|
|
beforeAll(function () use ($file) {
|
|
@unlink($file);
|
|
});
|
|
|
|
afterAll(function () use ($file) {
|
|
@unlink($file);
|
|
});
|
|
|
|
test('deletes file after all', function () use ($file) {
|
|
file_put_contents($file, 'foo');
|
|
$this->assertFileExists($file);
|
|
register_shutdown_function(function () {
|
|
// $this->assertFileDoesNotExist($file);
|
|
});
|
|
});
|