Skip to content

Commit

Permalink
Skip test if service not available
Browse files Browse the repository at this point in the history
  • Loading branch information
mattamon committed Oct 23, 2024
1 parent 3e20f9b commit a6b6844
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tests/Model/Processor/ProcessorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

namespace Pimcore\Bundle\WebToPrintBundle\Tests\Model\Processor;

use com\realobjects\pdfreactor\webservice\client\ServiceUnavailableException;
use Pimcore\Bundle\WebToPrintBundle\Config;
use Pimcore\Bundle\WebToPrintBundle\Processor;
use Pimcore\Document\Adapter\Ghostscript;
Expand Down Expand Up @@ -68,7 +69,12 @@ public function checkProcessors(string $processorName, array $config): void

$processorClass = 'Pimcore\Bundle\WebToPrintBundle\Processor\\'.$processorName;
$processor = new $processorClass();
$pdfContent = $this->getPDFfromProcessor($processor, $config);

try {
$pdfContent = $this->getPDFfromProcessor($processor, $config);
} catch (ServiceUnavailableException $e) {
$this->incomplete('Service Unavailable: ' . $e->getMessage());
}

$file = tmpfile();
$tempMetadata = stream_get_meta_data($file);
Expand Down

0 comments on commit a6b6844

Please sign in to comment.