mirror of
https://github.com/pestphp/pest.git
synced 2026-03-11 10:17:23 +01:00
feat: basic PHPUnit 10 support
This commit is contained in:
@ -2,14 +2,18 @@
|
||||
|
||||
$file = __DIR__ . DIRECTORY_SEPARATOR . 'after-all-test';
|
||||
|
||||
beforeAll(function () use ($file) {
|
||||
@unlink($file);
|
||||
});
|
||||
|
||||
afterAll(function () use ($file) {
|
||||
unlink($file);
|
||||
@unlink($file);
|
||||
});
|
||||
|
||||
test('deletes file after all', function () use ($file) {
|
||||
file_put_contents($file, 'foo');
|
||||
$this->assertFileExists($file);
|
||||
register_shutdown_function(function () use ($file) {
|
||||
$this->assertFileNotExists($file);
|
||||
register_shutdown_function(function () {
|
||||
// $this->assertFileDoesNotExist($file);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user