Skip to content

Commit 0b628da

Browse files
committed
Check binaries remain installed if call is made a second time
1 parent bcc56ac commit 0b628da

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

tests/Unit/InstallerTest.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,17 @@ public function testBinariesInstallation()
1111
unlink($file);
1212
}
1313

14+
// Check binaries install after deletion
1415
Installer::installBinaries();
16+
$this->checkBinariesAreInstalled();
17+
18+
// Check binaries remain installed if call is made a second time
19+
Installer::installBinaries();
20+
$this->checkBinariesAreInstalled();
21+
}
1522

23+
private function checkBinariesAreInstalled()
24+
{
1625
$files = glob(__DIR__.'/../../bin/*');
1726

1827
array_walk($files, function(&$value) {
@@ -24,7 +33,6 @@ public function testBinariesInstallation()
2433
foreach($expectedFiles as $expectedFile) {
2534
$this->assertContains($expectedFile, $files);
2635
}
27-
2836
}
2937

3038
}

0 commit comments

Comments
 (0)