Closed Ilyes512 closed 2 years ago
Hmm I think I found the cause...
I have 2 separate testsuites (Unit and Feature). I was only using BypassFinals::enable()
in some of the Unit testcases where I was mocking some of the classes.
The problem is that the class was probably already loaded by a Feature test where I was not calling BypassFinals::enable()
. Once I added also called BypassFinals::enable()
in all feature tests it was working as it should.
So I guess it works! All is good! Closing this. Thanks!
It seems that this library does not work when you use PHPUnit together with the
--order-by random
flag.I have only confirmed this on one project (maybe someone else can confirm this by running
$ phpunit --order-by random
in a project using this library?I am using PHP 8.1.6 with PHPUnit 9.5.24.