MDL-71036 phpunit: Renamed various file-related assertions
commitcbf01aa79a26677fce42c45145a400d9dc4f28b2
authorEloy Lafuente (stronk7) <stronk7@moodle.org>
Fri, 19 Feb 2021 15:24:16 +0000 (19 16:24 +0100)
committerEloy Lafuente (stronk7) <stronk7@moodle.org>
Thu, 11 Mar 2021 22:07:30 +0000 (11 23:07 +0100)
tree4bf5b37ddd1953bc20919b6ac6d552e58327e70c
parent87680e8b2b1df68a50270aa324ee53ed6d0e4b1e
MDL-71036 phpunit: Renamed various file-related assertions

In PHPUnit 9.1, the following file-related assertions
have been deprecated and there are new alternatives for
all them:
- assertNotIsReadable()         -> assertIsNotReadable()
- assertNotIsWritable()         -> assertIsNotWritable()
- assertDirectoryNotExists()    -> assertDirectoryDoesNotExist()
- assertDirectoryNotIsReadable()-> assertDirectoryIsNotReadable()
- assertDirectoryNotIsWritable()-> assertDirectoryIsNotWritable()
- assertFileNotExists()         -> assertFileDoesNotExist()
- assertFileNotIsReadable()     -> assertFileIsNotReadable()
- assertFileNotIsWritable()     -> assertFileIsNotWritable()

This is about to, simply, move all cases to the new alternatives.

Source: https://github.com/sebastianbergmann/phpunit/blob/9.1.0/ChangeLog-9.1.md

Regexp to find all them:

ag 'assertNotIsReadable|assertNotIsWritable|assertDirectoryNotExists|\
assertDirectoryNotIsReadable|assertDirectoryNotIsWritable|\
assertFileNotExists|assertFileNotIsReadable|assertFileNotIsWritable'
cache/tests/cache_test.php
lib/antivirus/clamav/tests/scanner_test.php
lib/filestorage/tests/file_storage_test.php
lib/filestorage/tests/zip_packer_test.php
lib/tests/antivirus_test.php
lib/tests/component_test.php
lib/tests/filterlib_test.php
lib/tests/plugin_manager_test.php
lib/tests/setuplib_test.php