Merge branch 'MDL-72585-master' of git://github.com/dpalou/moodle
[moodle.git] / message / tests / externallib_test.php
index 0b20199..f716e85 100644 (file)
@@ -1292,7 +1292,7 @@ class core_message_externallib_testcase extends externallib_advanced_testcase {
      * Test get_messages.
      */
     public function test_get_messages() {
-        global $CFG, $DB;
+        global $CFG, $DB, $PAGE;
         $this->resetAfterTest(true);
 
         $this->preventResetByRollback();
@@ -1482,6 +1482,8 @@ class core_message_externallib_testcase extends externallib_advanced_testcase {
         $this->assertObjectHasAttribute('datakey', json_decode($messages['messages'][0]['customdata']));
         $this->assertEquals('mod_feedback', $messages['messages'][0]['component']);
         $this->assertEquals('submission', $messages['messages'][0]['eventtype']);
+        $feedbackicon = clean_param($PAGE->get_renderer('core')->image_url('icon', 'mod_feedback')->out(), PARAM_URL);
+        $this->assertEquals($feedbackicon, $messages['messages'][0]['iconurl']);
 
         // Test warnings.
         $CFG->messaging = 0;