mirror of
https://github.com/moodle/moodle.git
synced 2025-04-13 12:32:08 +02:00
MDL-57001 user_menu: Fixes for unit tests
We added a link to the user menu so we have to adjust the tests.
This commit is contained in:
parent
8c224317ee
commit
22b8c5b842
@ -93,8 +93,8 @@ test
|
||||
// We always add two dividers as standard.
|
||||
$dividercount += 2;
|
||||
|
||||
// The basic entry count will additionally include the wrapper menu, Dashboard, Profile, and the Logout link.
|
||||
$entrycount += 3;
|
||||
// The basic entry count will additionally include the wrapper menu, Dashboard, Profile, Logout and switch roles link.
|
||||
$entrycount += 4;
|
||||
|
||||
$output = $OUTPUT->user_menu($USER);
|
||||
preg_match_all('/<a [^>]+role="menuitem"[^>]+>/', $output, $results);
|
||||
|
@ -473,6 +473,7 @@ class core_userliblib_testcase extends advanced_testcase {
|
||||
|
||||
$testsize = 100;
|
||||
|
||||
$PAGE->set_url('/');
|
||||
$user = $this->getDataGenerator()->create_user();
|
||||
$opts = user_get_user_navigation_info($user, $PAGE, array('avatarsize' => $testsize));
|
||||
$avatarhtml = $opts->metadata['useravatar'];
|
||||
|
Loading…
x
Reference in New Issue
Block a user