mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
71f74dd165
We are using "stubbing" method to replace real component (clamav) control points with doubles in order to avoid direct calls to clamav. For more details, please refer to https://phpunit.de/manual/4.8/en/test-doubles.html Notice, that while it is possible to use setExpectedException in the tests, this does not seem play correctly with consecutive assertions in the same test after exception is thrown (they seem omitted). Explicit try/catch construction has been used in testing instead. To run just this test, use: vendor/bin/phpunit antivirus_clamav_scanner_testcase lib/antivirus/clamav/tests/scanner_test.php