Advertisement
stronk7

Untitled

Oct 20th, 2019
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.13 KB | None | 0 0
  1. diff --git a/user/tests/privacy_test.php b/user/tests/privacy_test.php
  2. index 8a1a9f8b1f3..cc5e6ed43aa 100644
  3. --- a/user/tests/privacy_test.php
  4. +++ b/user/tests/privacy_test.php
  5. @@ -116,11 +116,11 @@ class core_user_privacy_testcase extends provider_testcase {
  6. $courserequestdata = (array) $writer->get_data([get_string('privacy:courserequestpath', 'user')]);
  7. $entry = array_shift($courserequestdata);
  8. // Make sure that the password is not exported.
  9. - $this->assertFalse(array_key_exists('password', $entry));
  10. + $this->assertFalse(property_exists($entry, 'password'));
  11. // Check that some of the other fields are present.
  12. - $this->assertTrue(array_key_exists('fullname', $entry));
  13. - $this->assertTrue(array_key_exists('shortname', $entry));
  14. - $this->assertTrue(array_key_exists('summary', $entry));
  15. + $this->assertTrue(property_exists($entry, 'fullname'));
  16. + $this->assertTrue(property_exists($entry, 'shortname'));
  17. + $this->assertTrue(property_exists($entry, 'summary'));
  18.  
  19. // User details.
  20. $userdata = (array) $writer->get_data([]);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement