5 require_once(
'./libs/composer/vendor/autoload.php');
31 $mock = Mockery::mock(\ilVirusScanner::class);
33 $mock->shouldReceive(
"scanFile")->once()->withArgs(array(
$stream->getMetadata(
'uri') ))->andReturn(
"Virus found!!!");
38 $this->assertSame(
'Virus detected.',
$result->getMessage());
45 $mock = Mockery::mock(\ilVirusScanner::class);
47 $mock->shouldReceive(
"scanFile")->once()->withArgs(array(
$stream->getMetadata(
'uri') ))->andReturn(
"");
const REJECTED
Upload got rejected by a processor.
Class VirusScannerPreProcessor.
Class VirusScannerPreProcessorTest.
$stream
PHP stream implementation.
static ofString($string)
Creates a new stream with an initial value.