Ruslan Kabalin 71f74dd165 MDL-50887 antivirus_clamav: Add unit tests for scanner class.
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
2016-02-29 09:31:30 +00:00
..