Improve test coverage for ApiDelete.php