Skip to content

Commit 1c86b17

Browse files
committed
Tests file patch.
Fixes some small typos and very slightly refactors the file.
1 parent 1e47d0d commit 1c86b17

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tests.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
/**
1010
* If this file remains intact after deploying the package to production,
1111
* preventing it from running outside of Composer may be useful as a means of
12-
* prevent potential attackers from hammering the file and needlessly wasting
12+
* preventing potential attackers from hammering it and needlessly wasting
1313
* cycles at the server.
1414
*/
1515
if (!isset($_SERVER['COMPOSER_BINARY'])) {
@@ -49,10 +49,10 @@
4949
// Fetch the signatures needed for testing the scanner.
5050
$ZipObj = new \ZipArchive();
5151
if ($ZipObj->open($TestsPath . 'signatures.zip') === true) {
52-
$ZipObj->extractTo($TestsPath . 'signatures' . DIRECTORY_SEPARATOR);
52+
$SigPath = $TestsPath . 'signatures';
53+
$ZipObj->extractTo($SigPath . DIRECTORY_SEPARATOR);
5354
$ZipObj->close();
5455
unset($ZipObj);
55-
$SigPath = $TestsPath . 'signatures';
5656
} else {
5757
echo 'Problem encountered trying to open signatures.zip.' . PHP_EOL;
5858
exit(3);
@@ -92,7 +92,7 @@
9292
$Actual = $Scanner->scan($Samples, 3);
9393
ksort($Actual);
9494
if (serialize($Actual) !== serialize($Expected)) {
95-
echo 'Actual scan results does not match expected scan results.' . PHP_EOL;
95+
echo 'Actual scan results don\'t match the expected scan results.' . PHP_EOL;
9696
exit(5);
9797
}
9898

0 commit comments

Comments
 (0)