Skip to content
GitLab
    • Explore Projects Groups Topics Snippets
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • F file-upload-bundle
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 3
    • Issues 3
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 1
    • Merge requests 1
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar

La forge institutionnelle d'INRAE étant en production depuis le 10 juin 2025, nous vous invitons à y créer vos nouveaux projets.

  • Pôle IS
  • Bundles Symfony 2Bundles Symfony 2
  • file-upload-bundle
  • Merge requests
  • !1

Add antivirus analyse (xenelop quahog)

  • Review changes

  • Download
  • Patches
  • Plain diff
Merged Guillaume Perréal requested to merge antivirus into symfony3 7 years ago
  • Overview 9
  • Commits 6
  • Pipelines 0
  • Changes 1
Viewing commit 11a29fd3
Prev Next
Show latest version
1 file
+ 6
− 8

    Preferences

    File browser
    Compare changes
  • 11a29fd3
    Predhumeau Manon
    CS. · 11a29fd3
    Predhumeau Manon authored 7 years ago
Tests/Listener/VirusScannerListenerTest.php
+ 6
− 8
  • View file @ 11a29fd3

  • Edit in single-file editor

  • Open in Web IDE


@@ -8,9 +8,9 @@ namespace Irstea\FileUploadBundle\Tests\Listener;
use Irstea\FileUploadBundle\Event\FileUploadCompleteEvent;
use Irstea\FileUploadBundle\Listener\VirusScannerListener;
use Irstea\FileUploadBundle\Model\UploadedFileInterface;
use PHPUnit_Framework_MockObject_MockObject;
use PHPUnit_Framework_TestCase;
use Irstea\FileUploadBundle\Model\UploadedFileInterface;
use Xenolope\Quahog\Client;
use Xenolope\Quahog\Exception\ConnectionException;
@@ -55,13 +55,12 @@ class VirusScannerListenerTest extends PHPUnit_Framework_TestCase
$this->listener = new VirusScannerListener($this->client);
}
public function testOnFileUploadCompletedResultOk()
{
$result = [
'filename' => 'footpath',
'reason' => null,
'status' => Client::RESULT_OK
'reason' => null,
'status' => Client::RESULT_OK,
];
$this->client->expects($this->once())->method('scanFile')->with('foopath')->willReturn($result);
@@ -76,9 +75,9 @@ class VirusScannerListenerTest extends PHPUnit_Framework_TestCase
public function testOnFileUploadCompletedVirusFound()
{
$result = [
'filename' => 'footpath',
'reason' => 'Terrible virus',
'status' => Client::RESULT_FOUND
'filename' => 'foopath',
'reason' => 'Terrible virus',
'status' => Client::RESULT_FOUND,
];
$this->client->expects($this->once())
@@ -102,7 +101,6 @@ class VirusScannerListenerTest extends PHPUnit_Framework_TestCase
$this->listener->onFileUploadCompleted($this->event);
}
public function testGetClientSucceed()
{
$this->client->expects($this->once())->method('ping')->willReturn(true);
0 Assignees
None
Assign to
0 Reviewers
None
Request review from
Labels
0
None
0
None
    Assign labels
  • Manage project labels

Milestone
No milestone
None
None
Time tracking
No estimate or time spent
Lock merge request
Unlocked
2
2 Participants
Guillaume Perréal
Predhumeau Manon
Reference: pole-is/bundles/file-upload-bundle!1
Source branch: antivirus

Menu

Explore Projects Groups Topics Snippets