Skip to content

Commit d8fc37c

Browse files
committed
Ignore test when java is installed
1 parent 37be1a9 commit d8fc37c

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

tests/JSignPDFTest.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,11 @@ public function testSignWhenPasswordIsInvalid()
8484

8585
public function testSignWhenJavaNotFound()
8686
{
87+
$javaVersion = exec("java -version 2>&1");
88+
$hasJavaVersion = strpos($javaVersion, 'not found') === false;
89+
if ($hasJavaVersion) {
90+
$this->markTestSkipped('Java is already installed, impossible to test if it is not installed');
91+
}
8792
$this->expectExceptionMessage('Java not installed, set the flag "isUseJavaInstalled" as false or install java.');
8893
$params = JSignParamBuilder::instance()->withDefault()->setIsUseJavaInstalled(true);
8994
$this->service->sign($params);

0 commit comments

Comments
 (0)