Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.0.x will end 8 May 2023 (12 months).
  • Bug fixes for security issues in 4.0.x will end 13 November 2023 (18 months).
  • PHP version: minimum PHP 7.3.0 Note: the minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is also supported.

(no description)

File Size: 172 lines (7 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class


Class: primary_test  - X-Ref

Class core_primary_testcase

Unit test for the primary nav view.

test_setting_initialise($usertype, $expected)   X-Ref
Test the initialise in different contexts

param: string $usertype The user to setup for - admin, guest, regular user
param: string $expected The expected nodes

setting_initialise_provider()   X-Ref
Data provider for the test_setting_initialise function


get_tree_initilised_to_set_activate(?string $seturl = null)   X-Ref
Get the nav tree initialised to test search_and_set_active_node.

return: navigation_node The initialised nav tree.
param: string|null $seturl The url set for $PAGE.

test_search_and_set_active_node(string $expectedkey, ?string $key = null, ?string $seturl = null)   X-Ref
Testing search_and_set_active_node.

return: void
param: string $expectedkey Expected key of the node, if set.
param: string|null $key The key of the node to activate.
param: string|null $seturl Set the url for $PAGE.

search_and_set_active_node_provider()   X-Ref
Data provider for test_search_and_set_active_node

return: array