PHPUnit improvements and fixes

Change-Id: Ia83d2cd8b5f7b971098daf580839bd61f08be354
Signed-off-by: Yuliya Bozhko <yuliya.bozhko@totaralms.com>
Merge "PHPUnit improvements and fixes"