From a5bb3a70aad48a3bf2808dbe5b0c8c568f7109db Mon Sep 17 00:00:00 2001 From: Petr Skoda Date: Mon, 26 Sep 2011 23:26:09 +0200 Subject: [PATCH] MDL-29401 few more tests for Eloy --- lib/simpletest/testmoodlelib.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/simpletest/testmoodlelib.php b/lib/simpletest/testmoodlelib.php index d08515b947d18..fed0767a061a7 100644 --- a/lib/simpletest/testmoodlelib.php +++ b/lib/simpletest/testmoodlelib.php @@ -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'); @@ -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), ''); @@ -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), '');