Skip to content

Commit

Permalink
MDL-29401 few more tests for Eloy
Browse files Browse the repository at this point in the history
  • Loading branch information
skodak committed Sep 26, 2011
1 parent 5a2bd48 commit a5bb3a7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/simpletest/testmoodlelib.php
Expand Up @@ -697,6 +697,7 @@ function test_clean_param_component() {
// please note the cleaning of component names is very strict, no guessing here
$this->assertIdentical(clean_param('mod_forum', PARAM_COMPONENT), 'mod_forum');
$this->assertIdentical(clean_param('block_online_users', PARAM_COMPONENT), 'block_online_users');
$this->assertIdentical(clean_param('block_blond_online_users', PARAM_COMPONENT), 'block_blond_online_users');
$this->assertIdentical(clean_param('mod_something2', PARAM_COMPONENT), 'mod_something2');
$this->assertIdentical(clean_param('forum', PARAM_COMPONENT), 'forum');
$this->assertIdentical(clean_param('user', PARAM_COMPONENT), 'user');
Expand All @@ -722,6 +723,7 @@ function test_clean_param_plugin() {
$this->assertIdentical(clean_param('forum', PARAM_PLUGIN), 'forum');
$this->assertIdentical(clean_param('forum2', PARAM_PLUGIN), 'forum2');
$this->assertIdentical(clean_param('online_users', PARAM_PLUGIN), 'online_users');
$this->assertIdentical(clean_param('blond_online_users', PARAM_PLUGIN), 'blond_online_users');
$this->assertIdentical(clean_param('online__users', PARAM_PLUGIN), '');
$this->assertIdentical(clean_param('forum ', PARAM_PLUGIN), '');
$this->assertIdentical(clean_param('forum.old', PARAM_PLUGIN), '');
Expand All @@ -737,6 +739,7 @@ function test_clean_param_area() {
$this->assertIdentical(clean_param('something', PARAM_AREA), 'something');
$this->assertIdentical(clean_param('something2', PARAM_AREA), 'something2');
$this->assertIdentical(clean_param('some_thing', PARAM_AREA), 'some_thing');
$this->assertIdentical(clean_param('some_thing_xx', PARAM_AREA), 'some_thing_xx');
$this->assertIdentical(clean_param('_something', PARAM_AREA), '');
$this->assertIdentical(clean_param('something_', PARAM_AREA), '');
$this->assertIdentical(clean_param('2something', PARAM_AREA), '');
Expand Down

0 comments on commit a5bb3a7

Please sign in to comment.