Skip to content

Commit

Permalink
Replace * ANF-ID: ... with * # ANF-ID: ...
Browse files Browse the repository at this point in the history
  • Loading branch information
Glutamat42 committed Jul 11, 2024
1 parent c63063d commit bc72193
Show file tree
Hide file tree
Showing 19 changed files with 94 additions and 94 deletions.
8 changes: 4 additions & 4 deletions tests/adler_score_helpers_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public function tearDown(): void {
}

/**
* ANF-ID: [MVP9, MVP8, MVP7]
* # ANF-ID: [MVP9, MVP8, MVP7]
*/
public function test_get_adler_score_objects() {
// setup
Expand Down Expand Up @@ -102,7 +102,7 @@ public function provide_test_get_achieved_scores_data(): array {
/**
* @dataProvider provide_test_get_achieved_scores_data
*
* ANF-ID: [MVP9, MVP8, MVP7]
* # ANF-ID: [MVP9, MVP8, MVP7]
*/
public function test_get_achieved_scores($data) {
// create 3 adler_score objects and mock get_score
Expand Down Expand Up @@ -139,7 +139,7 @@ public function test_get_achieved_scores($data) {
}

/**
* ANF-ID: [MVP9, MVP8, MVP7]
* # ANF-ID: [MVP9, MVP8, MVP7]
*/
public function test_get_achieved_scores_with_module_ids() {
// setup
Expand Down Expand Up @@ -170,7 +170,7 @@ public function test_get_achieved_scores_with_module_ids() {
}

/**
* ANF-ID: [MVP12, MVP10, MVP9, MVP8, MVP7]
* # ANF-ID: [MVP12, MVP10, MVP9, MVP8, MVP7]
*/
public function test_get_adler_score_record() {
// create course
Expand Down
8 changes: 4 additions & 4 deletions tests/adler_score_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ public function provide_test_construct_data() {
/**
* @dataProvider provide_test_construct_data
*
* ANF-ID: [MVP12, MVP10, MVP9, MVP8, MVP7]
* # ANF-ID: [MVP12, MVP10, MVP9, MVP8, MVP7]
*/
public function test_construct($test) {
// reset
Expand Down Expand Up @@ -235,7 +235,7 @@ public function provide_test_get_primitive_score_data() {
/**
* @dataProvider provide_test_get_primitive_score_data
*
* ANF-ID: [MVP10]
* # ANF-ID: [MVP10]
*/
public function test_get_primitive_score($data) {
// create primitive activity
Expand Down Expand Up @@ -320,7 +320,7 @@ private function fix_scaled_attribute_of_h5pactivity_attempts() {
/**
* @medium
*
* ANF-ID: [MVP7]
* # ANF-ID: [MVP7]
*/
public function test_get_score_for_h5p_learning_element() {
global $CFG;
Expand Down Expand Up @@ -438,7 +438,7 @@ public function test_get_score_for_h5p_learning_element() {
}

/**
* ANF-ID: [MVP10, MVP9, MVP8, MVP7]
* # ANF-ID: [MVP10, MVP9, MVP8, MVP7]
*/
public function test_calculate_percentage_achieved() {
// test setup
Expand Down
8 changes: 4 additions & 4 deletions tests/backup/moodle2/backup_adler_plugin_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ private function verify_points($expected, $actual) {
* Test the backup score logic.
* @medium
*
* ANF-ID: [MVP1]
* # ANF-ID: [MVP1]
*/
public function test_backup_score() {
// Create score item with generator
Expand Down Expand Up @@ -105,7 +105,7 @@ public function test_backup_score() {
* Test the backup of module without score data.
* @medium
*
* ANF-ID: [MVP1]
* # ANF-ID: [MVP1]
*/
public function test_backup_no_score() {
// Create a backup of the module.
Expand Down Expand Up @@ -141,7 +141,7 @@ private function verify_course($expected, $actual) {
}

/**
* ANF-ID: [MVP1]
* # ANF-ID: [MVP1]
*/
public function test_backup_course() {
// Create score item with generator
Expand Down Expand Up @@ -170,7 +170,7 @@ public function test_backup_course() {
}

/**
* ANF-ID: [MVP1]
* # ANF-ID: [MVP1]
*/
public function test_backup_course_not_adler_course() {
// Create a backup of the course.
Expand Down
26 changes: 13 additions & 13 deletions tests/backup/moodle2/restore_adler_plugin_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public function setUpModule(): array {
* @return ReflectionMethod
* @throws ReflectionException
*
* ANF-ID: [MVP2]
* # ANF-ID: [MVP2]
*/
protected static function getMethodAsPublic(string $name): ReflectionMethod {
$class = new ReflectionClass(restore_local_adler_plugin::class);
Expand All @@ -55,7 +55,7 @@ protected static function getMethodAsPublic(string $name): ReflectionMethod {
}

/**
* ANF-ID: [MVP2]
* # ANF-ID: [MVP2]
*/
public function test_process_adler_module_one_element() {
// setup
Expand All @@ -81,7 +81,7 @@ public function test_process_adler_module_one_element() {
}

/**
* ANF-ID: [MVP2]
* # ANF-ID: [MVP2]
*/
public function test_process_adler_module_one_element_default_values() {
// test without optional fields (timecreated, timemodified)
Expand All @@ -107,7 +107,7 @@ public function test_process_adler_module_one_element_default_values() {
}

/**
* ANF-ID: [MVP2]
* # ANF-ID: [MVP2]
*/
public function test_process_adler_module_multiple_elements() {
list($data, $stub) = $this->setUpModule();
Expand All @@ -120,7 +120,7 @@ public function test_process_adler_module_multiple_elements() {
}

/**
* ANF-ID: [MVP2]
* # ANF-ID: [MVP2]
*/
public function test_process_adler_module_invalid_datatype() {
// setup
Expand Down Expand Up @@ -149,7 +149,7 @@ public function test_process_adler_module_invalid_datatype() {
}

/**
* ANF-ID: [MVP2]
* # ANF-ID: [MVP2]
*/
public function test_process_adler_module_missing_fields() {
// setup
Expand All @@ -174,7 +174,7 @@ public function test_process_adler_module_missing_fields() {
}

/**
* ANF-ID: [MVP2]
* # ANF-ID: [MVP2]
*/
public function test_define_module_plugin_structure() {
list($data, $stub) = $this->setUpModule();
Expand Down Expand Up @@ -203,7 +203,7 @@ public function test_define_module_plugin_structure() {
}

/**
* ANF-ID: [MVP2]
* # ANF-ID: [MVP2]
*/
public function setUpCourse(): array {
$data = $this->getDataGenerator()->get_plugin_generator('local_adler')->create_adler_course_object(1, [], false);
Expand All @@ -222,7 +222,7 @@ public function setUpCourse(): array {
}

/**
* ANF-ID: [MVP2]
* # ANF-ID: [MVP2]
*/
public function test_define_course_plugin_structure() {
list($data, $stub) = $this->setUpCourse();
Expand Down Expand Up @@ -251,7 +251,7 @@ public function test_define_course_plugin_structure() {
}

/**
* ANF-ID: [MVP2]
* # ANF-ID: [MVP2]
*/
public function test_process_adler_course() {
// setup
Expand All @@ -273,7 +273,7 @@ public function test_process_adler_course() {
}

/**
* ANF-ID: [MVP2]
* # ANF-ID: [MVP2]
*/
public function test_process_adler_course_optional_fields() {
// setup
Expand All @@ -300,7 +300,7 @@ public function test_process_adler_course_optional_fields() {
}

/**
* ANF-ID: [MVP2]
* # ANF-ID: [MVP2]
*/
public function test_define_section_plugin_structure() {
$restore_mock = $this
Expand Down Expand Up @@ -343,7 +343,7 @@ public function provide_test_process_adler_section_data() {
/**
* @dataProvider provide_test_process_adler_section_data
*
* ANF-ID: [MVP2]
* # ANF-ID: [MVP2]
*/
public function test_process_adler_section($restore_data) {
$restore_mock = $this
Expand Down
12 changes: 6 additions & 6 deletions tests/cli/create_course_cat_and_assign_user_role_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class create_course_cat_and_assign_user_role_test extends adler_testcase {
* @dataProvider provide_test_create_course_cat_and_assign_user_role_data
* @runInSeparateProcess
*
* ANF-ID: [MVP20, MVP21]
* # ANF-ID: [MVP20, MVP21]
*/
public function test_create_course_cat_and_assign_user_role($username, $role, $category_path, $expected_parameters, $expected_exit_code) {
global $CFG;
Expand Down Expand Up @@ -85,7 +85,7 @@ public function provide_test_create_course_cat_and_assign_user_role_data() {
}

/**
* ANF-ID: [MVP20, MVP21]
* # ANF-ID: [MVP20, MVP21]
*/
public function test_script_with_unknown_parameter() {
global $CFG;
Expand All @@ -104,7 +104,7 @@ public function test_script_with_unknown_parameter() {
}

/**
* ANF-ID: [MVP20, MVP21]
* # ANF-ID: [MVP20, MVP21]
*/
public function test_script_with_help_parameter() {
global $CFG;
Expand All @@ -127,7 +127,7 @@ public function test_script_with_help_parameter() {
/**
* integration test
*
* ANF-ID: [MVP20, MVP21]
* # ANF-ID: [MVP20, MVP21]
*/
public function test_script_with_valid_parameters() {
$category_path = 'test / valid_category_path';
Expand Down Expand Up @@ -163,7 +163,7 @@ public function test_script_with_valid_parameters() {
/**
* integration test
*
* ANF-ID: [MVP20, MVP21]
* # ANF-ID: [MVP20, MVP21]
*/
public function test_script_without_category_path() {
global $CFG, $DB;
Expand All @@ -190,7 +190,7 @@ public function test_script_without_category_path() {
}

/**
* ANF-ID: [MVP20, MVP21]
* # ANF-ID: [MVP20, MVP21]
*/
public function test_with_role_that_cannot_be_assigned_to_course_category() {
global $CFG, $DB;
Expand Down
4 changes: 2 additions & 2 deletions tests/external/get_element_ids_by_uuids_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ public function provide_test_execute_data() {
/**
* @dataProvider provide_test_execute_data
*
* ANF-ID: [MVP6]
* # ANF-ID: [MVP6]
*/
public function test_execute($element, $adler_element_exists, $expected_result, $expected_exception) {
$course = $this->getDataGenerator()->create_course();
Expand Down Expand Up @@ -192,7 +192,7 @@ public function provide_test_execute_returns_data() {
/**
* @dataProvider provide_test_execute_returns_data
*
* ANF-ID: [MVP6]
* # ANF-ID: [MVP6]
*/
public function test_execute_returns($data, $success) {
if (!$success) {
Expand Down
2 changes: 1 addition & 1 deletion tests/external/lib_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ public function test_get_adler_score_response_multiple_structure($class_to_test
}

/**
* ANF-ID: [MVP10, MVP9, MVP8, MVP7]
* # ANF-ID: [MVP10, MVP9, MVP8, MVP7]
*/
public function test_convert_adler_score_array_format_to_response_structure() {
$testcases = [
Expand Down
4 changes: 2 additions & 2 deletions tests/external/score_get_course_scores_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public function provide_test_execute_data() {
/**
* @dataProvider provide_test_execute_data
*
* ANF-ID: [MVP7]
* # ANF-ID: [MVP7]
*/
public function test_execute($element_count) {
$course = $this->getDataGenerator()->create_course();
Expand Down Expand Up @@ -73,7 +73,7 @@ public function test_execute($element_count) {
}

/**
* ANF-ID: [MVP7]
* # ANF-ID: [MVP7]
*/
public function test_execute_returns() {
// this function just returns what get_adler_score_response_multiple_structure returns
Expand Down
6 changes: 3 additions & 3 deletions tests/external/score_get_element_scores_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
*/
class score_get_element_scores_test extends adler_externallib_testcase {
/**
* ANF-ID: [MVP8]
* # ANF-ID: [MVP8]
*/
public function test_execute() {
global $CFG;
Expand Down Expand Up @@ -56,7 +56,7 @@ public function test_execute() {
}

/**
* ANF-ID: [MVP8]
* # ANF-ID: [MVP8]
*/
public function test_execute_exceptions() {
global $CFG;
Expand Down Expand Up @@ -182,7 +182,7 @@ public function test_execute_exceptions() {
}

/**
* ANF-ID: [MVP8]
* # ANF-ID: [MVP8]
*/
public function test_execute_returns() {
// this function just returns what get_adler_score_response_multiple_structure returns
Expand Down
6 changes: 3 additions & 3 deletions tests/external/score_h5p_learning_element_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public function provide_test_get_module_ids_from_xapi_data() {
/**
* @dataProvider provide_test_get_module_ids_from_xapi_data
*
* ANF-ID: [MVP9]
* # ANF-ID: [MVP9]
*/
public function test_get_module_ids_from_xapi($xapi, $expect_exception, $contextid_to_instanceid_mapping, $expected_result) {
// create mock
Expand Down Expand Up @@ -119,7 +119,7 @@ public function provide_test_execute_data() {
/**
* @dataProvider provide_test_execute_data
*
* ANF-ID: [MVP9]
* # ANF-ID: [MVP9]
*/
public function test_execute($exception_get_adler_score_objects, $core_xapi_statement_post_error, $get_achieved_scores_response, $get_achived_scores_exception) {
$xapi = "blub";
Expand Down Expand Up @@ -162,7 +162,7 @@ public function test_execute($exception_get_adler_score_objects, $core_xapi_stat
}

/**
* ANF-ID: [MVP9]
* # ANF-ID: [MVP9]
*/
public function test_execute_returns() {
// this function just returns what get_adler_score_response_multiple_structure returns
Expand Down
Loading

0 comments on commit bc72193

Please sign in to comment.