silverstripe / silverstripe-mfa

MultiFactor Authentication for Silverstripe CMS
BSD 3-Clause "New" or "Revised" License
11 stars 24 forks source link

FIX phpunit tests in php8 #418

Closed emteknetnz closed 3 years ago

emteknetnz commented 3 years ago

PHP8 won't allow passing an interface (StoreInterface) to createMock(). Instead we need to mock class.

https://travis-ci.com/github/silverstripe/silverstripe-mfa/jobs/471512031

image

Cheddam commented 3 years ago

I produced a fix for the root cause of this issue in sminnee/phpunit-mock-objects, but it hasn't been merged yet due to an issue with Xdebug in the CI 😢

I've just restarted the build in the other PR to see if one of the recent Xdebug patches has fixed the problem - if not, we can merge this in the meantime.