Proyectos de Subversion Moodle

Rev

Rev 11 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 11 Rev 1441
Línea 22... Línea 22...
22
 * @package    antivirus_clamav
22
 * @package    antivirus_clamav
23
 * @category   test
23
 * @category   test
24
 * @copyright  2016 Ruslan Kabalin, Lancaster University.
24
 * @copyright  2016 Ruslan Kabalin, Lancaster University.
25
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
25
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
26
 */
26
 */
27
class scanner_test extends \advanced_testcase {
27
final class scanner_test extends \advanced_testcase {
28
    /** @var string temporary file used in testing */
28
    /** @var string temporary file used in testing */
29
    protected $tempfile;
29
    protected $tempfile;
Línea 30... Línea 30...
30
 
30
 
-
 
31
    protected function setUp(): void {
31
    protected function setUp(): void {
32
        parent::setUp();
Línea 32... Línea 33...
32
        $this->resetAfterTest();
33
        $this->resetAfterTest();
33
 
34
 
34
        // Create tempfile.
35
        // Create tempfile.
35
        $tempfolder = make_request_directory(false);
36
        $tempfolder = make_request_directory(false);
36
        $this->tempfile = $tempfolder . '/' . rand();
37
        $this->tempfile = $tempfolder . '/' . rand();
Línea 37... Línea 38...
37
        touch($this->tempfile);
38
        touch($this->tempfile);
38
    }
39
    }
-
 
40
 
39
 
41
    protected function tearDown(): void {
Línea 40... Línea 42...
40
    protected function tearDown(): void {
42
        @unlink($this->tempfile);
41
        @unlink($this->tempfile);
43
        parent::tearDown();
42
    }
44
    }