Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.11.x will end 14 Nov 2022 (12 months plus 6 months extension).
  • Bug fixes for security issues in 3.11.x will end 13 Nov 2023 (18 months plus 12 months extension).
  • PHP version: minimum PHP 7.3.0 Note: minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is supported too.

Differences Between: [Versions 310 and 311] [Versions 311 and 400] [Versions 311 and 401] [Versions 311 and 402] [Versions 311 and 403] [Versions 39 and 311]

Unit tests for lib/navigationlib.php

Copyright: 2009 Sam Hemelryk
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later (5)
File Size: 675 lines (27 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 6 classes


Class: navigationlib_test  - X-Ref

Unit tests for lib/navigationlib.php

setup_node()   X-Ref


test_node__construct()   X-Ref
No description

test_node_add()   X-Ref
No description

test_node_add_before()   X-Ref
No description

test_node_add_class()   X-Ref
No description

test_node_check_if_active()   X-Ref
No description

test_node_contains_active_node()   X-Ref
No description

test_node_find_active_node()   X-Ref
No description

test_node_find()   X-Ref
No description

test_node_find_expandable()   X-Ref
No description

test_node_get()   X-Ref
No description

test_node_get_css_type()   X-Ref
No description

test_node_make_active()   X-Ref
No description

test_node_remove()   X-Ref
No description

test_node_remove_class()   X-Ref
No description

test_module_extends_navigation()   X-Ref
No description

test_navbar_prepend_and_add()   X-Ref
No description

test_navbar_has_items(\moodle_page $page)   X-Ref

param: $node

test_cache__get()   X-Ref
No description

test_cache__set()   X-Ref
No description

test_cache_cached()   X-Ref
No description

test_cache_clear()   X-Ref
No description

test_cache_set()   X-Ref
No description

test_setting___construct()   X-Ref
No description

test_setting__initialise($node)   X-Ref

param: mixed $node
return: mixed

test_can_view_user_preferences()   X-Ref
Test that users with the correct permissions can view the preferences page.


test_setting_in_alternative_role($node)   X-Ref

param: mixed $node
return: mixed

test_navigation_node_collection_remove_with_no_type()   X-Ref
No description

test_navigation_node_collection_remove_with_type()   X-Ref
No description

Class: exposed_global_navigation  - X-Ref

This is a dummy object that allows us to call protected methods within the
global navigation class by prefixing the methods with `exposed_`

__construct(\moodle_page $page=null)   X-Ref
No description

__call($method, $arguments)   X-Ref
No description

set_initialised()   X-Ref
No description

Class: mock_initialise_global_navigation  - X-Ref

load_for_category()   X-Ref
No description

load_for_course()   X-Ref
No description

load_for_activity()   X-Ref
No description

load_for_user($user=null, $forceforcontext=false)   X-Ref
No description

Class: exposed_navbar  - X-Ref

This is a dummy object that allows us to call protected methods within the
global navigation class by prefixing the methods with `exposed_`.

__construct(\moodle_page $page)   X-Ref
No description

__call($method, $arguments)   X-Ref
No description

Class: navigation_exposed_moodle_page  - X-Ref

set_navigation(navigation_node $node)   X-Ref
No description

Class: exposed_settings_navigation  - X-Ref

This is a dummy object that allows us to call protected methods within the
global navigation class by prefixing the methods with `exposed_`.

__construct()   X-Ref
No description

__call($method, $arguments)   X-Ref
No description