From e52dbcdef49f598df3ab44af961c46dd44ec6d51 Mon Sep 17 00:00:00 2001 From: Tim Hunt Date: Mon, 13 Mar 2023 13:31:33 +0000 Subject: [PATCH] MDL-77611 tool_uploaduser: fix phpunit assumptions about profile fields --- admin/tool/uploaduser/tests/cli_test.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/admin/tool/uploaduser/tests/cli_test.php b/admin/tool/uploaduser/tests/cli_test.php index 969ad7d4aae..f053eec7dea 100644 --- a/admin/tool/uploaduser/tests/cli_test.php +++ b/admin/tool/uploaduser/tests/cli_test.php @@ -143,7 +143,8 @@ class cli_test extends \advanced_testcase { // Created users have data in the profile fields. $user1 = \core_user::get_user_by_username('reznort'); $profilefields1 = profile_user_record($user1->id); - $this->assertEquals((object)['superfield' => 'Loves cats'], $profilefields1); + $this->assertObjectHasAttribute('superfield', $profilefields1); + $this->assertEquals('Loves cats', $profilefields1->superfield); } /**