/** * Test get message processor. */ public function test_get_message_processor() { $this->resetAfterTest(true); // Create a user. $user1 = self::getDataGenerator()->create_user(); // Set you as the user. $this->setUser($user1); // Get the message processors. $result = core_message_external::get_message_processor($user1->id, 'popup'); // We need to execute the return values cleaning process to simulate the web service server. $result = external_api::clean_returnvalue(core_message_external::get_message_processor_returns(), $result); $this->assertNotEmpty($result['systemconfigured']); $this->assertNotEmpty($result['userconfigured']); }