Make phpunit tests compatible with both PHPUnit 6 and 4.
Also makes using Hamcrest's assertThat not marked as
Note: this is also making tests in phpunit/composer
directory required to be run using MW test runner,
as it uses (at least temporarily) MW's traits
that provide PHPUnit compatibility layer,
and mark Hamcrest-asserted as not risky.