feat: basic PHPUnit 10 support

This commit is contained in:
Nuno Maduro
2021-10-24 01:03:18 +01:00
parent de46ee0f64
commit cf47b45262
32 changed files with 807 additions and 549 deletions

View File

@ -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);
});
});