MDL-41707 allow custom location of external test files used from unit tests

This commit is contained in:
Petr Škoda 2013-09-24 21:11:10 +02:00
parent d45e65ccad
commit a9d2f1b414
8 changed files with 78 additions and 37 deletions

View file

@ -33,7 +33,8 @@ class core_componentlib_testcase extends advanced_testcase {
public function test_component_installer() {
global $CFG;
$ci = new component_installer('http://download.moodle.org', 'unittest', 'downloadtests.zip');
$url = $this->getExternalTestFileUrl('');
$ci = new component_installer($url, '', 'downloadtests.zip');
$this->assertTrue($ci->check_requisites());
$destpath = $CFG->dataroot.'/downloadtests';