Skip to content

Commit

Permalink
Fix test (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
blankse authored Mar 26, 2022
1 parent 4cc3c7e commit 0b4a7fa
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions tests/test.bats
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions tests/testdata/PdfReactorCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -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('<info>Pimcore can generate a PDF</info>');
return 0;
}

$output->writeln('<error>Pimcore can not generate a PDF</error>');
return 1;
}
}

0 comments on commit 0b4a7fa

Please sign in to comment.