File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -23,10 +23,7 @@ public function getPath(JSignParam $params): string
2323 $ downloadUrl = $ params ->getJavaDownloadUrl ();
2424
2525 if ($ javaPath && !$ downloadUrl ) {
26- if (is_file ($ javaPath ) && is_executable ($ javaPath )) {
27- return $ javaPath ;
28- }
29- throw new InvalidArgumentException ('Java path defined is not executable: ' . $ javaPath );
26+ return $ javaPath ;
3027 }
3128
3229 if ($ downloadUrl && $ javaPath ) {
Original file line number Diff line number Diff line change @@ -43,15 +43,15 @@ public function testGetPathWithCustomAndValidJavaPath(): void
4343 $ this ->assertEquals ('vfs://download/bin/java ' , $ path );
4444 }
4545
46- public function testGetPathWithCustomAndInvalidJavaPath (): void
46+ public function testGetPathWithCustomJavaPath (): void
4747 {
4848 $ jsignParam = new JSignParam ();
4949 $ service = new JavaRuntimeService ();
50- $ jsignParam ->setJavaPath (__FILE__ );
50+ $ expectedPath = __FILE__ ;
51+ $ jsignParam ->setJavaPath ($ expectedPath );
5152 $ jsignParam ->setJavaDownloadUrl ('' );
52- $ this ->expectException (InvalidArgumentException::class);
53- $ this ->expectExceptionMessageMatches ('/not executable/ ' );
54- $ service ->getPath ($ jsignParam );
53+ $ actual = $ service ->getPath ($ jsignParam );
54+ $ this ->assertEquals ($ expectedPath , $ actual );
5555 }
5656
5757 public function testGetPathWithDownloadUrlAndNotRealDirectory (): void
You can’t perform that action at this time.
0 commit comments