1. 22 Jul, 2021 1 commit
  2. 20 Apr, 2021 1 commit
  3. 12 Mar, 2021 1 commit
    • Eloy Lafuente's avatar
      MDL-71036 phpunit: assertContains() now performs strict comparison · 8a14a7bd
      Eloy Lafuente authored
      The methods assertContains() and assertNotContains() now perform
      strict (type and value) comparison, pretty much like assertSame()
      A couple of new assertContainsEquals() and assertNotContainsEquals()
      methods have been created to provide old (non-strict) behavior, pretty
      much like assertEquals() do.
      Apart from replacing the calls needing a relaxed comparison to those
      new methods, there are also a couple of alternative, about how to
      fix this, depending of every case:
      - If the test is making any array_values() conversion, then it's better
        to remove that conversion and use assertArrayHasKey(), that is not
      - Sometimes if may be also possible to, simply, cast the expectation
        to the exact type coming in the array. I've not applied this technique
        to any of the cases in core.
      Link: https://github.com/sebastianbergmann/phpunit/issues/3426
  4. 24 Nov, 2020 1 commit
  5. 21 Oct, 2020 2 commits
    • Eloy Lafuente's avatar
      MDL-67673 phpunit: Remove deprecated assertContains() uses on strings · 40de097e
      Eloy Lafuente authored
      Both assertContains() and assertNotContains() are deprecated in PHPUnit 8
      for operations on strings. Also the optional case parameter is. All uses
      must be changed to one of:
      - assertStringContainsString()
      - assertStringContainsStringIgnoringCase()
      - assertStringNotContainsString()
      - assertStringNotContainsStringIgnoringCase()
      More info: https://github.com/sebastianbergmann/phpunit/issues/3422
      Regexp to find all uses:
      ag 'assert(Not)?Contains\('
    • Eloy Lafuente's avatar
      MDL-67673 phpunit: Remove deprecated non-public attribute assertions · a293b3ae
      Eloy Lafuente authored
      With PHPUnit 8 a good number of assertions, all them related with
      operations on non-public attributes have been deprecated. And will
      be removed with PHPUnit 9.
      The main point is that unit tests shouldn't be testing non-public
      APIs (good practice) and those assertions were an error originally.
      See https://github.com/sebastianbergmann/phpunit/issues/3338 for
      the complete list and other details.
      When possible (the attributes being checked are public), the change
      is simple, just switching to normal assertions.
      When the attributes are not public we need to find a workaround
      to be able to test the same using public APIs, or use Reflection,
      or remove the tests.
      For the records, this is the regexp used to find all the cases:
      ag '>(assertAttribute|attribute\(|readAttributte|getStaticAttribute| \
          getObjectAttribute)' -G "test.php"
  6. 07 Sep, 2020 1 commit
  7. 20 Dec, 2019 1 commit
  8. 28 Aug, 2019 1 commit
  9. 30 Jul, 2019 1 commit
    • Eloy Lafuente's avatar
      MDL-65093 core_message: remove some "dupe" tests · eaaef6d6
      Eloy Lafuente authored
      With the deprecation of can_post_message() in favor of
      can_send_message() all the new test_can_send_message_xxx()
      were created from the original test_can_post_message_xxx() ones.
      So, really we don't need all the old ones. Just ensure that
      debugging is being called and done. New tests are already covering
      the new method.
      Note this is not strictly needed but in practice is allowing
      MySQL + PHP 7.3 to stop segfaulting (because of some sort of limit /
      overflow happening somewhere else). So this is just a practical
      fix to avoid that while all the messaging tests are reorganizaed
      @ MDL-63670. There are some good things to fix there.
  10. 29 Jul, 2019 2 commits
  11. 15 May, 2019 2 commits
  12. 07 May, 2019 1 commit
  13. 06 May, 2019 3 commits
  14. 30 Apr, 2019 2 commits
  15. 25 Apr, 2019 2 commits
  16. 16 Apr, 2019 1 commit
    • Sara Arjona's avatar
      MDL-64715 message: add support for self conversations · 734b198f
      Sara Arjona authored
      Added new MESSAGE_CONVERSATION_TYPE_SELF type for self-conversations
      and upgraded legacy self-conversations to the new type, removing
      repeated members in the message_conversation_members table.
      Besides, from now, a self-conversation will be created by default for
      all the existing users.
      All the self-conversations have been also starred and a default message
      will be displayed always to explain how to use them.
  17. 15 Apr, 2019 1 commit
  18. 13 Mar, 2019 3 commits
  19. 14 Dec, 2018 1 commit
  20. 04 Dec, 2018 1 commit
  21. 27 Nov, 2018 2 commits
  22. 26 Nov, 2018 3 commits
  23. 23 Nov, 2018 3 commits
  24. 21 Nov, 2018 1 commit
  25. 19 Nov, 2018 2 commits