1414class JavaRuntimeServiceTest extends TestCase
1515{
1616 public string $ testTmpDir = '' ;
17- protected function setUp (): void {
17+ protected function setUp (): void
18+ {
1819 $ this ->testTmpDir = sys_get_temp_dir () . '/jsignpdf_temp_dir_ ' . uniqid ();
1920 mkdir (directory: $ this ->testTmpDir , recursive: true );
2021 }
2122
22- public function testGetPathWhenJavaIsInstalled (): void {
23+ public function testGetPathWhenJavaIsInstalled (): void
24+ {
2325 $ jsignParam = new JSignParam ();
2426 $ service = new JavaRuntimeService ();
2527 $ jsignParam ->setIsUseJavaInstalled (true );
2628 $ path = $ service ->getPath ($ jsignParam );
2729 $ this ->assertEquals ('java ' , $ path );
2830 }
2931
30- public function testGetPathWithCustomAndValidJavaPath (): void {
32+ public function testGetPathWithCustomAndValidJavaPath (): void
33+ {
3134 $ jsignParam = new JSignParam ();
3235 $ service = new JavaRuntimeService ();
3336 vfsStream::setup ('download ' );
@@ -40,7 +43,8 @@ public function testGetPathWithCustomAndValidJavaPath(): void {
4043 $ this ->assertEquals ('vfs://download/bin/java ' , $ path );
4144 }
4245
43- public function testGetPathWithCustomAndInvalidJavaPath (): void {
46+ public function testGetPathWithCustomAndInvalidJavaPath (): void
47+ {
4448 $ jsignParam = new JSignParam ();
4549 $ service = new JavaRuntimeService ();
4650 $ jsignParam ->setJavaPath (__FILE__ );
@@ -50,7 +54,8 @@ public function testGetPathWithCustomAndInvalidJavaPath(): void {
5054 $ service ->getPath ($ jsignParam );
5155 }
5256
53- public function testGetPathWithDownloadUrlAndNotRealDirectory (): void {
57+ public function testGetPathWithDownloadUrlAndNotRealDirectory (): void
58+ {
5459 $ jsignParam = new JSignParam ();
5560 $ service = new JavaRuntimeService ();
5661 $ root = vfsStream::setup ('download ' );
@@ -65,7 +70,8 @@ public function testGetPathWithDownloadUrlAndNotRealDirectory(): void {
6570 $ service ->getPath ($ jsignParam );
6671 }
6772
68- public function testGetPathWithDownloadUrlWithInvalidUrl (): void {
73+ public function testGetPathWithDownloadUrlWithInvalidUrl (): void
74+ {
6975 vfsStream::setup ('download ' );
7076 mkdir ('vfs://download/bin ' );
7177 touch ('vfs://download/bin/java ' );
@@ -79,7 +85,8 @@ public function testGetPathWithDownloadUrlWithInvalidUrl(): void {
7985 $ service ->getPath ($ jsignParam );
8086 }
8187
82- public function testGetPathWithDownloadUrlWith4xxError (): void {
88+ public function testGetPathWithDownloadUrlWith4xxError (): void
89+ {
8390 vfsStream::setup ('download ' );
8491 mkdir ('vfs://download/bin ' );
8592 touch ('vfs://download/bin/java ' );
@@ -93,7 +100,8 @@ public function testGetPathWithDownloadUrlWith4xxError(): void {
93100 $ service ->getPath ($ jsignParam );
94101 }
95102
96- public function testGetPathWithDownloadUrlWithInvalidGzipedFile (): void {
103+ public function testGetPathWithDownloadUrlWithInvalidGzipedFile (): void
104+ {
97105 vfsStream::setup ('download ' );
98106 mkdir ('vfs://download/bin ' );
99107 touch ('vfs://download/bin/java ' );
@@ -119,7 +127,8 @@ public function testGetPathWithDownloadUrlWithInvalidGzipedFile(): void {
119127 $ service ->getPath ($ jsignParam );
120128 }
121129
122- public function testGetPathWithDownloadUrlWithInvalidJavaPackage (): void {
130+ public function testGetPathWithDownloadUrlWithInvalidJavaPackage (): void
131+ {
123132 mkdir ($ this ->testTmpDir . '/bin ' , 0755 , true );
124133
125134 $ jsignParam = new JSignParam ();
@@ -146,7 +155,8 @@ public function testGetPathWithDownloadUrlWithInvalidJavaPackage(): void {
146155 $ service ->getPath ($ jsignParam );
147156 }
148157
149- public function testGetPathWithDownloadUrlWithInvalidVersion (): void {
158+ public function testGetPathWithDownloadUrlWithInvalidVersion (): void
159+ {
150160 $ jsignParam = new JSignParam ();
151161 $ service = new JavaRuntimeService ();
152162
@@ -166,7 +176,8 @@ public function testGetPathWithDownloadUrlWithInvalidVersion(): void {
166176 $ service ->getPath ($ jsignParam );
167177 }
168178
169- public function testGetPathWithDownloadUrlWithValidVersion (): void {
179+ public function testGetPathWithDownloadUrlWithValidVersion (): void
180+ {
170181 $ jsignParam = new JSignParam ();
171182 $ service = new JavaRuntimeService ();
172183
@@ -183,7 +194,8 @@ public function testGetPathWithDownloadUrlWithValidVersion(): void {
183194 $ this ->assertEquals ($ jsignParam ->getJavaPath (), $ javaPath );
184195 }
185196
186- public function testGetPathWithoutJavaFallback (): void {
197+ public function testGetPathWithoutJavaFallback (): void
198+ {
187199 mkdir ($ this ->testTmpDir . '/bin ' , 0755 , true );
188200
189201 $ jsignParam = new JSignParam ();
0 commit comments