mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-30 02:25:00 +00:00
Let ConvertController return a pdf file directly without trying to converting it
Those changes improve performance when the file is already in pdf format.
This commit is contained in:
@@ -12,6 +12,7 @@ declare(strict_types=1);
|
||||
namespace Chill\WopiBundle\Tests\Controller;
|
||||
|
||||
use Chill\DocStoreBundle\Entity\StoredObject;
|
||||
use Chill\DocStoreBundle\Security\Authorization\StoredObjectRoleEnum;
|
||||
use Chill\DocStoreBundle\Service\StoredObjectManagerInterface;
|
||||
use Chill\WopiBundle\Controller\ConvertController;
|
||||
use Chill\WopiBundle\Service\WopiConverter;
|
||||
@@ -37,6 +38,7 @@ final class ConvertControllerTest extends TestCase
|
||||
|
||||
$security = $this->prophesize(Security::class);
|
||||
$security->isGranted('ROLE_USER')->willReturn(true);
|
||||
$security->isGranted(StoredObjectRoleEnum::SEE->value, $storedObject)->willReturn(true);
|
||||
|
||||
$storeManager = $this->prophesize(StoredObjectManagerInterface::class);
|
||||
$storeManager->read($storedObject)->willReturn('content');
|
||||
@@ -67,6 +69,7 @@ final class ConvertControllerTest extends TestCase
|
||||
|
||||
$security = $this->prophesize(Security::class);
|
||||
$security->isGranted('ROLE_USER')->willReturn(true);
|
||||
$security->isGranted(StoredObjectRoleEnum::SEE->value, $storedObject)->willReturn(true);
|
||||
|
||||
$storeManager = $this->prophesize(StoredObjectManagerInterface::class);
|
||||
$storeManager->read($storedObject)->willReturn('content');
|
||||
|
Reference in New Issue
Block a user