Skip to content

Commit 57b54e5

Browse files
committed
fix: ignore tests when haven't all requirements
Signed-off-by: Vitor Mattos <[email protected]>
1 parent e4b67ec commit 57b54e5

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

tests/JSignPDFTest.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ public function testSignWhenPasswordIsInvalid()
171171

172172
public function testJSignPDFNotFound()
173173
{
174-
$this->expectExceptionMessageMatches('/Jar of JSignPDF not found on path/');
174+
$this->expectExceptionMessageMatches('/JSignPDF not found/');
175175
$params = JSignParamBuilder::instance()->withDefault()->setjSignPdfJarPath('invalid_path');
176176
$params->setCertificate($this->getNewCert($params->getPassword()));
177177
$this->service->getVersion($params);
@@ -192,6 +192,9 @@ public function testSignWhenJavaNotFound()
192192

193193
public function testGetVersion()
194194
{
195+
if (!class_exists('JSignPDF\JSignPDFBin\JavaCommandService')) {
196+
$this->markTestSkipped('Install jsignpdf/jsignpdf-bin');
197+
}
195198
$params = JSignParamBuilder::instance()->withDefault();
196199
$version = $this->service->getVersion($params);
197200
$this->assertNotEmpty($version);

0 commit comments

Comments
 (0)