MDL-17884: Add test_download_file_content and componentlib to unittest. Credit goes to Tomasz Muras

This commit is contained in:
Rossiani Wijaya
2011-01-14 14:52:24 +08:00
parent 5a7f931ee5
commit 2d572444e1
2 changed files with 69 additions and 0 deletions
+6
View File
@@ -79,4 +79,10 @@ class filelib_test extends UnitTestCase {
$postdata = format_postdata_for_curlcall($postdatatoconvert);
$this->assertEqual($postdata, $expectedresult);
}
public function test_download_file_content() {
$testhtml = "http://download.moodle.org/unittest/test.html";
$contents = download_file_content($testhtml);
$this->assertEqual('47250a973d1b88d9445f94db4ef2c97a', md5($contents));
}
}