本文整理汇总了PHP中advanced_testcase::setup方法的典型用法代码示例。如果您正苦于以下问题:PHP advanced_testcase::setup方法的具体用法?PHP advanced_testcase::setup怎么用?PHP advanced_testcase::setup使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类advanced_testcase
的用法示例。
在下文中一共展示了advanced_testcase::setup方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: setUp
protected function setUp()
{
global $CFG;
parent::setup();
$this->resetAfterTest(true);
$CFG->grade_droplow = -1;
$CFG->grade_keephigh = -1;
$CFG->grade_aggregation = -1;
$CFG->grade_aggregateonlygraded = -1;
$CFG->grade_aggregateoutcomes = -1;
$CFG->grade_aggregatesubcats = -1;
$this->course = $this->getDataGenerator()->create_course();
$this->courseid = $this->course->id;
$this->user[0] = $this->getDataGenerator()->create_user();
$this->user[1] = $this->getDataGenerator()->create_user();
$this->user[2] = $this->getDataGenerator()->create_user();
$this->user[3] = $this->getDataGenerator()->create_user();
$this->userid = $this->user[0]->id;
$this->load_modules();
$this->load_scales();
$this->load_grade_categories();
$this->load_grade_items();
$this->load_grade_grades();
$this->load_grade_outcomes();
}
示例2: setUp
protected function setUp()
{
parent::setup();
$this->resetAfterTest(true);
$this->robot = new \local_linkchecker_robot\robot\crawler();
}
示例3: setUp
/**
* Create temporary test tables and entries in the database for these tests.
* These tests have to work on a brand new site.
*/
public function setUp()
{
global $CFG;
parent::setup();
$this->generator = $this->getDataGenerator()->get_plugin_generator('mod_ouwiki');
}