Moodle

Add tests for file_get_contents(), componentlib and rss

Details

  • Difficulty:
    Moderate
  • Affected Branches:
    MOODLE_20_STABLE
  • Fixed Branches:
    MOODLE_20_STABLE

Description

In MDLSITE-318 we have uploaded some well-known files to download.moodle.org, see
http://download.moodle.org/unittest/README.txt for details.

It would be great to have some unit tests to check how componentlib, file_get_contents() and rss aggregation is working.

Assigning to Nico. Not critical at all (addressing to 2.0). Ciao

Issue Links

Activity

Hide
Tomasz Muras added a comment -

testcomponentlib.php attached - please review.

Show
Tomasz Muras added a comment - testcomponentlib.php attached - please review.
Hide
Eloy Lafuente (stronk7) added a comment -

Moved to stable backlog and assigning to Rossie for review/testing.

If everything looks/works ok and tests are interesting in order to have componentlib covered... please create one PULL request about this (credit goes to Tomasz Muras).

Thanks and ciao

Show
Eloy Lafuente (stronk7) added a comment - Moved to stable backlog and assigning to Rossie for review/testing. If everything looks/works ok and tests are interesting in order to have componentlib covered... please create one PULL request about this (credit goes to Tomasz Muras). Thanks and ciao
Hide
Rossiani Wijaya added a comment -

Thanks Tomasz for the patch.

Tomasz's patch works and passed the unittest.

However, it seems to skip the rss test.

I created a patch to add test for rss. Please take a look the patch and let me now if it needs to be modified.

patch is available at:
https://github.com/rwijaya/moodle/commit/8018981f134bd0ed875d3779256bf6466ad6308f

Thanks
Rosie

Show
Rossiani Wijaya added a comment - Thanks Tomasz for the patch. Tomasz's patch works and passed the unittest. However, it seems to skip the rss test. I created a patch to add test for rss. Please take a look the patch and let me now if it needs to be modified. patch is available at: https://github.com/rwijaya/moodle/commit/8018981f134bd0ed875d3779256bf6466ad6308f Thanks Rosie
Hide
Rossiani Wijaya added a comment - - edited
Show
Rossiani Wijaya added a comment - - edited Add Dongsheng to review the patch patch: https://github.com/rwijaya/moodle/compare/master...wip-MDL-17884_m20
Hide
Dongsheng Cai added a comment -

Hi, Rossiani

download_file_content is a filelib function, it should be tested in lib/simpletest/libfilelib.php, rsstest.xml already being tested in lib/simpletest/testrss.php.

otherwise it looks good to me.

Show
Dongsheng Cai added a comment - Hi, Rossiani download_file_content is a filelib function, it should be tested in lib/simpletest/libfilelib.php, rsstest.xml already being tested in lib/simpletest/testrss.php. otherwise it looks good to me.
Hide
Rossiani Wijaya added a comment -

Thanks Dongsheng for commenting.

new patch is available at: https://github.com/rwijaya/moodle/compare/master...MDL-17884_m20

added to pull request: PULL-118.

Rosie

Show
Rossiani Wijaya added a comment - Thanks Dongsheng for commenting. new patch is available at: https://github.com/rwijaya/moodle/compare/master...MDL-17884_m20 added to pull request: PULL-118. Rosie
Hide
Petr Škoda (skodak) added a comment -

Thanks!

Show
Petr Škoda (skodak) added a comment - Thanks!

Dates

  • Created:
    Updated:
    Resolved: