MDL-46647 core_grades: Adding tests for fetch_all_helper()