From: samhemelryk Date: Fri, 4 Sep 2009 03:18:02 +0000 (+0000) Subject: navigation MDL-20216 Refactored add arguments X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=bdb0a369b359b5147691ff43179de4251c7205ed;p=moodle.git navigation MDL-20216 Refactored add arguments Moved $action argument from arg5 to arg2 --- diff --git a/lib/simpletest/testnavigationlib.php b/lib/simpletest/testnavigationlib.php index 9ade008ce1..0a31576644 100644 --- a/lib/simpletest/testnavigationlib.php +++ b/lib/simpletest/testnavigationlib.php @@ -40,9 +40,9 @@ class navigation_node_test extends UnitTestCase { $FULLME = 'http://www.moodle.org/test.php'; $this->node = new navigation_node('Test Node'); $this->node->type = navigation_node::TYPE_SYSTEM; - $this->node->add('demo1', 'http://www.moodle.org/',$CFG->httpswwwroot . '/pix/i/course.gif', null, 'demo1', navigation_node::TYPE_COURSE); - $this->node->add('demo2', 'http://www.moodle.com/',$CFG->httpswwwroot . '/pix/i/course.gif', null, 'demo2', navigation_node::TYPE_COURSE); - $this->node->add('demo3', 'http://www.moodle.org/',$CFG->httpswwwroot . '/pix/i/course.gif', null, 'demo3', navigation_node::TYPE_CATEGORY); + $this->node->add('demo1', 'http://www.moodle.org/', null, 'demo1', navigation_node::TYPE_COURSE,$CFG->httpswwwroot . '/pix/i/course.gif'); + $this->node->add('demo2', 'http://www.moodle.com/', null, 'demo2', navigation_node::TYPE_COURSE,$CFG->httpswwwroot . '/pix/i/course.gif'); + $this->node->add('demo3', 'http://www.moodle.org/', null, 'demo3', navigation_node::TYPE_CATEGORY,$CFG->httpswwwroot . '/pix/i/course.gif'); $this->node->get('demo3')->add('demo4', new moodle_url('http://www.moodle.org/'), null, 'demo4', navigation_node::TYPE_COURSE, $CFG->httpswwwroot . '/pix/i/course.gif'); $this->node->get('demo3')->add('demo5', 'http://www.moodle.org/test.php', null, 'demo5', navigation_node::TYPE_COURSE,$CFG->httpswwwroot . '/pix/i/course.gif'); $this->node->get('demo3')->get('demo5')->make_active(); @@ -102,7 +102,7 @@ class navigation_node_test extends UnitTestCase { public function test_add_to_path() { global $CFG; $path = array('demo3','demo5'); - $key1 = $this->node->add_to_path($path, 'http://www.moodle.org/','testatp1', 'Test add to path 1', 'testatp1', navigation_node::TYPE_COURSE, $CFG->httpswwwroot . '/pix/i/course.gif'); + $key1 = $this->node->add_to_path($path,'testatp1', 'Test add to path 1', 'testatp1', navigation_node::TYPE_COURSE, 'http://www.moodle.org/', $CFG->httpswwwroot . '/pix/i/course.gif'); $this->assertEqual($key1, 'testatp1'); // This should generate an exception as we have not provided any text for