Merge "Improve test coverage for ApiBase.php"