Task #84933
closed
static variable in FileInfo
Added by Anja Leichsenring over 6 years ago.
Updated about 6 years ago.
Description
there is a static variable hidden in FileInfo.php, which introduces issues for unittests. It can easily be replaced by a class variable.
- Status changed from New to Under Review
- Related to Task #84934: Add UnitTests for ImageInfo added
What issues?
Any idea why was it introduced as static variable in the first place?
I just want to avoid reintroducing some other issues with it.
I had started with duplicating one test, that I wanted to adjust to another test case. The instance of GraphicalFunctions got in the way, because the test was not able to reset the mock.
I am not informed about the reason for putting a static variable there, it was introduced with #66268.
After conferring with Susi we decided it is bad design and agreed to replace it with a local class variable.
- Related to Bug #66268: ImageInfo::getImageSizes() doesn't recognize all supported images formats added
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
- Status changed from Resolved to Closed
Also available in: Atom
PDF