Skip to content

Commit

Permalink
Fix test: Pimcore still used cloud server
Browse files Browse the repository at this point in the history
  • Loading branch information
blankse committed Mar 27, 2022
1 parent c8f0cc1 commit ade3a32
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 17 deletions.
1 change: 0 additions & 1 deletion tests/test.bats
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ setup() {
echo "# Setting up Pimcore project via composer ${PROJNAME} in ${TESTDIR} ($(pwd))" >&3
ddev composer create -y -n pimcore/demo
ddev exec php vendor/pimcore/pimcore/bin/pimcore-install --admin-username admin --admin-password demo --mysql-host-socket db --mysql-username db --mysql-password db --mysql-database db --no-interaction
cp ${DIR}/tests/testdata/web2print.php var/config/web2print.php
cp ${DIR}/tests/testdata/PdfReactorCommand.php src/Command/PdfReactorCommand.php
}

Expand Down
7 changes: 7 additions & 0 deletions tests/testdata/PdfReactorCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace App\Command;

use Pimcore\Console\AbstractCommand;
use Pimcore\Model\Tool\SettingsStore;
use Pimcore\Web2Print\Processor;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
Expand All @@ -24,6 +25,12 @@ protected function configure(): void
*/
protected function execute(InputInterface $input, OutputInterface $output): int
{
SettingsStore::set(
'web_to_print',
'{"enableInDefaultView":true,"generalTool":"pdfreactor","generalDocumentSaveMode":"default","pdfreactorProtocol":"http","pdfreactorServer":"pdfreactor","pdfreactorServerPort":"9423","pdfreactorBaseUrl":"http:\\/\\/web","pdfreactorApiKey":"","pdfreactorLicence":"","pdfreactorEnableLenientHttpsMode":false,"pdfreactorEnableDebugMode":false}',
'string',
'pimcore_web_to_print'
);
if (Processor::getInstance()->preparePdfGeneration(75, ['disableBackgroundExecution' => true])) {
$output->writeln('<info>Pimcore can generate a PDF</info>');
return 0;
Expand Down
16 changes: 0 additions & 16 deletions tests/testdata/web2print.php

This file was deleted.

0 comments on commit ade3a32

Please sign in to comment.