Attempt to fix tests failing in latest php versions

Trying to fix these tests by using a non-internal class in the hopes of
fooling the system - got the idea from here:
https://github.com/sebastianbergmann/phpunit-mock-objects/issues/172