| Q |
A |
| PHPUnit version |
9.5.5 |
| PHP version |
7.4 |
| Installation Method |
Composer |
Summary
TestCase is instanciated per test (correct), but not destroyed immediatelly (wrong, non GCable)
Current behavior
not destroyed immediatelly
How to reproduce
see atk4/data@849a548 and related output https://github.com/atk4/data/runs/2782214124#step:8:31 (can be reproduced by running phpunit locally)
In the output, you can see that x representing TestCase::__destruct call is called after all tests are done.
Expected behavior
TestCase must be destroyed immediatelly after a test finishes. It is important to allow GC to free the TestCase instance immediatelly. This should be also tested in unit tests so same issue does not happen again.
Summary
TestCase is instanciated per test (correct), but not destroyed immediatelly (wrong, non GCable)
Current behavior
not destroyed immediatelly
How to reproduce
see atk4/data@849a548 and related output https://github.com/atk4/data/runs/2782214124#step:8:31 (can be reproduced by running phpunit locally)
In the output, you can see that
xrepresentingTestCase::__destructcall is called after all tests are done.Expected behavior
TestCase must be destroyed immediatelly after a test finishes. It is important to allow GC to free the TestCase instance immediatelly. This should be also tested in unit tests so same issue does not happen again.