mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
MDL-19579 code coverage - add more initial $includecoverage attributes
This commit is contained in:
parent
d47cf63dec
commit
081a63a9eb
18 changed files with 33 additions and 1 deletions
|
@ -13,6 +13,9 @@ if (!defined('MOODLE_INTERNAL')) {
|
|||
}
|
||||
|
||||
class accesslib_test extends UnitTestCaseUsingDatabase {
|
||||
|
||||
public static $includecoverage = array('lib/accesslib.php');
|
||||
|
||||
function test_get_parent_contexts() {
|
||||
$context = get_context_instance(CONTEXT_SYSTEM);
|
||||
$this->assertEqual(get_parent_contexts($context), array());
|
||||
|
|
|
@ -39,6 +39,8 @@ require_once($CFG->dirroot . '/backup/backuplib.php');
|
|||
|
||||
class backuplib_test extends UnitTestCase {
|
||||
|
||||
public static $includecoverage = array('backup/backuplib.php');
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
|
@ -39,6 +39,7 @@ require_once($CFG->libdir . '/blocklib.php');
|
|||
|
||||
/** Test-specific subclass to make some protected things public. */
|
||||
class testable_block_manager extends block_manager {
|
||||
|
||||
public function mark_loaded() {
|
||||
$this->birecordsbyregion = array();
|
||||
}
|
||||
|
@ -58,6 +59,7 @@ class block_ablocktype extends block_base {
|
|||
* Test functions that don't need to touch the database.
|
||||
*/
|
||||
class moodle_block_manager_test extends UnitTestCase {
|
||||
public static $includecoverage = array('lib/pagelib.php', 'lib/blocklib.php');
|
||||
protected $testpage;
|
||||
protected $blockmanager;
|
||||
|
||||
|
|
|
@ -88,6 +88,8 @@ class TimeModifiedExpectation extends SimpleExpectation {
|
|||
}
|
||||
|
||||
class completionlib_test extends FakeDBUnitTestCase {
|
||||
|
||||
public static $includecoverage = array('lib/completionlib.php');
|
||||
var $realdb,$realcfg,$realsession,$realuser;
|
||||
|
||||
function setUp() {
|
||||
|
|
|
@ -6,6 +6,7 @@ if (!defined('MOODLE_INTERNAL')) {
|
|||
require_once($CFG->dirroot . '/lib/conditionlib.php');
|
||||
|
||||
class conditionlib_test extends FakeDBUnitTestCase {
|
||||
public static $includecoverage = array('lib/conditionlib.php');
|
||||
var $oldcfg;
|
||||
|
||||
public function setUp() {
|
||||
|
|
|
@ -43,6 +43,7 @@ class filelib_test extends UnitTestCaseUsingDatabase {
|
|||
protected $coursecat;
|
||||
protected $user;
|
||||
protected $module;
|
||||
public static $includecoverage = array('lib/filelib.php');
|
||||
|
||||
/**
|
||||
* Setup the DB fixture data
|
||||
|
|
|
@ -42,6 +42,7 @@ require_once($CFG->libdir . '/filterlib.php');
|
|||
*/
|
||||
class filter_active_global_test extends UnitTestCaseUsingDatabase {
|
||||
private $syscontextid;
|
||||
public static $includecoverage = array('lib/filterlib.php');
|
||||
|
||||
public function setUp() {
|
||||
parent::setUp();
|
||||
|
|
|
@ -38,6 +38,7 @@ if (!defined('MOODLE_INTERNAL')) {
|
|||
require_once($CFG->libdir . '/filterlib.php');
|
||||
|
||||
class testable_filter_manager extends filter_manager {
|
||||
|
||||
public function __construct() {
|
||||
parent::__construct();
|
||||
}
|
||||
|
@ -53,6 +54,7 @@ class testable_filter_manager extends filter_manager {
|
|||
* Test functions that affect filter_active table with contextid = $syscontextid.
|
||||
*/
|
||||
class filter_manager_test extends UnitTestCase {
|
||||
public static $includecoverage = array('lib/filterlib.php');
|
||||
protected $filtermanager;
|
||||
protected $olddirroot;
|
||||
|
||||
|
|
|
@ -14,6 +14,8 @@ require_once($CFG->libdir . '/mathslib.php');
|
|||
*/
|
||||
class mathsslib_test extends UnitTestCase {
|
||||
|
||||
public static $includecoverage = array('lib/mathslib.php');
|
||||
|
||||
/**
|
||||
* Tests the basic formula evaluation
|
||||
*/
|
||||
|
|
|
@ -43,7 +43,7 @@ require_once($CFG->libdir . '/moodlelib.php');
|
|||
|
||||
class moodlelib_test extends UnitTestCase {
|
||||
|
||||
public static $includecoverage = array('lib/moodlelib.php');
|
||||
public static $includecoverage = array('lib/moodlelib.php');
|
||||
|
||||
var $user_agents = array(
|
||||
'MSIE' => array(
|
||||
|
|
|
@ -96,6 +96,9 @@ class moodle_test_renderer extends moodle_core_renderer {
|
|||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
class renderer_factory_base_test extends UnitTestCase {
|
||||
|
||||
public static $includecoverage = array('lib/outputlib.php');
|
||||
|
||||
public function test_get_calls_create() {
|
||||
// Set up.
|
||||
$factory = new testable_renderer_factory();
|
||||
|
|
|
@ -56,6 +56,7 @@ class testable_moodle_page extends moodle_page {
|
|||
class moodle_page_test extends UnitTestCase {
|
||||
protected $testpage;
|
||||
protected $originalcourse;
|
||||
public static $includecoverage = array('lib/pagelib.php', 'lib/blocklib.php');
|
||||
|
||||
public function setUp() {
|
||||
global $COURSE;
|
||||
|
|
|
@ -39,6 +39,8 @@ require_once($CFG->libdir . '/portfoliolib.php');
|
|||
|
||||
class portfoliolibaddbutton_test extends FakeDBUnitTestCase {
|
||||
|
||||
public static $includecoverage = array('lib/portfoliolib.php');
|
||||
|
||||
function test_set_formats() {
|
||||
|
||||
$button = new portfolio_add_button();
|
||||
|
|
|
@ -38,6 +38,9 @@ if (!defined('MOODLE_INTERNAL')) {
|
|||
require_once($CFG->libdir . '/questionlib.php');
|
||||
|
||||
class questionlib_test extends UnitTestCase {
|
||||
|
||||
public static $includecoverage = array('lib/questionlib.php');
|
||||
|
||||
function test_question_sort_qtype_array() {
|
||||
$config = new stdClass();
|
||||
$config->multichoice_sortorder = '1';
|
||||
|
|
|
@ -48,6 +48,8 @@ foreach ($repository_plugins as $plugin) {
|
|||
|
||||
class repositorylib_test extends FakeDBUnitTestCase {
|
||||
|
||||
public static $includecoverage = array('repository/lib.php');
|
||||
|
||||
function setup() {
|
||||
parent::setup();
|
||||
}
|
||||
|
|
|
@ -14,6 +14,7 @@ require_once($CFG->libdir.'/simplepie/moodle_simplepie.php');
|
|||
|
||||
class moodlesimplepie_test extends UnitTestCase {
|
||||
|
||||
public static $includecoverage = array('lib/simplepie/moodle_simplepie.php');
|
||||
var $testurl = 'http://download.moodle.org/unittest/rsstest.xml';
|
||||
|
||||
function test_getfeed(){
|
||||
|
|
|
@ -61,6 +61,8 @@ class testable_string_manager extends string_manager {
|
|||
}
|
||||
|
||||
class string_manager_test extends UnitTestCase {
|
||||
|
||||
public static $includecoverage = array('lib/moodlelib.php');
|
||||
protected $originallang;
|
||||
protected $workspace = 'temp/get_string_fixtures'; // Path inside $CFG->dataroot where we work.
|
||||
protected $basedir;
|
||||
|
|
|
@ -14,6 +14,8 @@ if (!defined('MOODLE_INTERNAL')) {
|
|||
|
||||
class web_test extends UnitTestCase {
|
||||
|
||||
public static $includecoverage = array('lib/weblib.php');
|
||||
|
||||
function setUp() {
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue