From 0b4a7fa6d1832f420e1646af0305735d511d010d Mon Sep 17 00:00:00 2001 From: Sebastian Blank Date: Sun, 27 Mar 2022 00:49:13 +0100 Subject: [PATCH] Fix test (#1) --- tests/test.bats | 4 ++-- tests/testdata/PdfReactorCommand.php | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/test.bats b/tests/test.bats index 36dc083..4eb7fc1 100644 --- a/tests/test.bats +++ b/tests/test.bats @@ -1,7 +1,7 @@ setup() { set -eu -o pipefail export DIR="$( cd "$( dirname "$BATS_TEST_FILENAME" )" >/dev/null 2>&1 && pwd )/.." - export TESTDIR=~/tmp/testpdfreactor + export TESTDIR=~/tmp/test-pdfreactor mkdir -p $TESTDIR export PROJNAME=test-pdfreactor export DDEV_NON_INTERACTIVE=true @@ -34,7 +34,7 @@ teardown() { @test "install from release" { set -eu -o pipefail cd ${TESTDIR} || ( printf "unable to cd to ${TESTDIR}\n" && exit 1 ) - echo "# ddev get drud/ddev-addon-template with project ${PROJNAME} in ${TESTDIR} ($(pwd))" >&3 + echo "# ddev get blankse/pdfreactor with project ${PROJNAME} in ${TESTDIR} ($(pwd))" >&3 ddev get blankse/pdfreactor ddev restart ddev php bin/console app:pdf-reactor diff --git a/tests/testdata/PdfReactorCommand.php b/tests/testdata/PdfReactorCommand.php index f1653df..461445e 100644 --- a/tests/testdata/PdfReactorCommand.php +++ b/tests/testdata/PdfReactorCommand.php @@ -24,12 +24,12 @@ protected function configure(): void */ protected function execute(InputInterface $input, OutputInterface $output): int { - $pdf = Processor::getInstance()->startPdfGeneration(75); - - if ($pdf) { + if (Processor::getInstance()->preparePdfGeneration(75, ['disableBackgroundExecution' => true])) { + $output->writeln('Pimcore can generate a PDF'); return 0; } + $output->writeln('Pimcore can not generate a PDF'); return 1; } }