Commit Graph

4 Commits

Author SHA1 Message Date
Eloy Lafuente (stronk7) 81407f18ec MDL-71036 phpunit: Mock->setMethods() silently deprecated
The current ->setMethods() has been silently (won't emit any
warning) in PHPUnit 9. And will stop working (current plans)
in PHPUnit 10.

Basically the now deprecated method has been split into:

- onlyMethods(): To point to existing methods in the mocked artifact.
- addMethods(): To point to non existing (yet) methods in the mocked
  artifact.

In practice that means that all our current setMethods() calls can be
converted to onlyMethods() (existing) and done. The addMethods() is
mostly useful on development phases, not final testing.

Finally note that <null> isn't accepted anymore as parameter to
double all the methods. Instead empty array [] must be used.

Link: https://github.com/sebastianbergmann/phpunit/issues/3770
2021-03-11 23:04:31 +01:00
Peter Dias 663c84ace6 MDL-70048 dropbox: Augmented unit tests to account for additional params 2021-01-28 07:31:07 +08:00
Mihail Geshoski b4d5080892 MDL-57666 repositories: Error when copying file from Dropbox repository 2018-07-30 09:28:48 +08:00
Andrew Nicols 066963cd18 MDL-52051 repository_dropbox: Migrate to v2 API 2016-10-11 11:17:09 +08:00