Fix phpunit tests
Merge pull request #1169 from nlegoff/unit-tests

[3.8] Fix phpunit tests