[ Index ]

PHP Cross Reference of moodle-2.8

title

Body

[close]

/lib/tests/ -> upgradelib_test.php (summary)

Unit tests for the lib/upgradelib.php library.

Copyright: 2013 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 356 lines (16 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

core_upgradelib_testcase:: (6 methods):
  test_upgrade_stale_php_files_present()
  test_upgrade_grade_item_fix_sortorder()
  insert_fake_grade_item_sortorder()
  test_upgrade_fix_missing_root_folders()
  test_upgrade_fix_missing_root_folders_draft()
  test_upgrade_availability_item()


Class: core_upgradelib_testcase  - X-Ref

Tests various classes and functions in upgradelib.php library.

test_upgrade_stale_php_files_present()   X-Ref
Test the {@link upgrade_stale_php_files_present() function


test_upgrade_grade_item_fix_sortorder()   X-Ref
Test the {@link upgrade_grade_item_fix_sortorder() function with
faked duplicate sortorder data.


insert_fake_grade_item_sortorder($courseid, $sortorder)   X-Ref
Populate some fake grade items into the database with specified
sortorder and course id.

NOTE: This function doesn't make much attempt to respect the
gradebook internals, its simply used to fake some data for
testing the upgradelib function. Please don't use it for other
purposes.

param: int $courseid id of course
param: int $sortorder numeric sorting order of item
return: stdClass grade item object from the database.

test_upgrade_fix_missing_root_folders()   X-Ref
No description

test_upgrade_fix_missing_root_folders_draft()   X-Ref
No description

test_upgrade_availability_item()   X-Ref
Tests the upgrade of an individual course-module or section from the
old to new availability system. (This test does not use the database
so it can run any time.)




Generated: Fri Nov 28 20:29:05 2014 Cross-referenced by PHPXref 0.7.1