File tree Expand file tree Collapse file tree 5 files changed +10
-12
lines changed Expand file tree Collapse file tree 5 files changed +10
-12
lines changed Original file line number Diff line number Diff line change @@ -24,4 +24,4 @@ public function parse()
24
24
{
25
25
return json_decode ($ this ->getJSONString ());
26
26
}
27
- }
27
+ }
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ public static function installBinaries()
8
8
{
9
9
$ binaryUrls = ['https://github.com/kvz/json2hcl/releases/download/v0.0.6/json2hcl_v0.0.6_linux_amd64 ' ];
10
10
11
- foreach ($ binaryUrls as $ binaryUrl ) {
11
+ foreach ($ binaryUrls as $ binaryUrl ) {
12
12
$ destination = __DIR__ .'/../bin/ ' .basename ($ binaryUrl );
13
13
14
14
if (file_exists ($ destination )) {
@@ -19,4 +19,4 @@ public static function installBinaries()
19
19
chmod ($ destination , 0755 );
20
20
}
21
21
}
22
- }
22
+ }
Original file line number Diff line number Diff line change 69
69
}
70
70
}
71
71
72
- */
72
+ */
Original file line number Diff line number Diff line change 1
1
<?php
2
2
3
- use PHPUnit \Framework \TestCase ;
4
3
use DivineOmega \HCLParser \HCLParser ;
4
+ use PHPUnit \Framework \TestCase ;
5
5
6
6
class BasicUsageTest extends TestCase
7
7
{
@@ -14,5 +14,4 @@ public function testBasicParsing()
14
14
15
15
$ this ->assertEquals ($ expected , $ configObject );
16
16
}
17
-
18
17
}
Original file line number Diff line number Diff line change 1
1
<?php
2
2
3
- use PHPUnit \Framework \TestCase ;
4
3
use DivineOmega \HCLParser \Installer ;
4
+ use PHPUnit \Framework \TestCase ;
5
5
6
6
class InstallerTest extends TestCase
7
7
{
8
8
public function testBinariesInstallation ()
9
9
{
10
- foreach (glob (__DIR__ .'/../../bin/* ' ) as $ file ) {
10
+ foreach (glob (__DIR__ .'/../../bin/* ' ) as $ file ) {
11
11
unlink ($ file );
12
12
}
13
13
14
14
// Check binaries install after deletion
15
15
Installer::installBinaries ();
16
16
$ this ->checkBinariesAreInstalled ();
17
-
17
+
18
18
// Check binaries remain installed if call is made a second time
19
19
Installer::installBinaries ();
20
20
$ this ->checkBinariesAreInstalled ();
@@ -24,15 +24,14 @@ private function checkBinariesAreInstalled()
24
24
{
25
25
$ files = glob (__DIR__ .'/../../bin/* ' );
26
26
27
- array_walk ($ files , function (&$ value ) {
27
+ array_walk ($ files , function (&$ value ) {
28
28
$ value = basename ($ value );
29
29
});
30
30
31
31
$ expectedFiles = ['json2hcl_v0.0.6_linux_amd64 ' ];
32
32
33
- foreach ($ expectedFiles as $ expectedFile ) {
33
+ foreach ($ expectedFiles as $ expectedFile ) {
34
34
$ this ->assertContains ($ expectedFile , $ files );
35
35
}
36
36
}
37
-
38
37
}
You can’t perform that action at this time.
0 commit comments