mirror of
https://github.com/moodle/moodle.git
synced 2025-01-17 21:49:15 +01:00
MDL-78648 badges: Fix in unit tests for test_get_user_badge_by_hash
This commit is contained in:
parent
8dbb6183ff
commit
9a5eb76a56
@ -184,13 +184,13 @@ class get_user_badge_by_hash_test extends externallib_advanced_testcase {
|
||||
// Site badge.
|
||||
$result = get_user_badge_by_hash::execute($data['sitebadge'][0]['uniquehash']);
|
||||
$result = \core_external\external_api::clean_returnvalue(get_user_badge_by_hash::execute_returns(), $result);
|
||||
$this->assertEquals($data['sitebadge'], $result['badge']);
|
||||
$this->assertEquals($data['sitebadge'][0]['uniquehash'], $result['badge'][0]['uniquehash']);
|
||||
$this->assertEmpty($result['warnings']);
|
||||
|
||||
// Course badge.
|
||||
$result = get_user_badge_by_hash::execute($data['coursebadge'][0]['uniquehash']);
|
||||
$result = \core_external\external_api::clean_returnvalue(get_user_badge_by_hash::execute_returns(), $result);
|
||||
$this->assertEquals($data['coursebadge'], $result['badge']);
|
||||
$this->assertEquals($data['coursebadge'][0]['uniquehash'], $result['badge'][0]['uniquehash']);
|
||||
$this->assertEmpty($result['warnings']);
|
||||
|
||||
// Wrong hash.
|
||||
|
Loading…
x
Reference in New Issue
Block a user