Skip to content

Commit

Permalink
bugfix: assert that realpath returns a non-empty-string for an exis…
Browse files Browse the repository at this point in the history
…ting file path

Signed-off-by: Maximilian Bösing <[email protected]>
  • Loading branch information
boesing committed Feb 21, 2023
1 parent cc37ace commit 0fe2d78
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion test/LaminasComponentInstallerIntegrationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
use PHPUnit\Framework\TestCase;
use ReflectionClass;

use function assert;
use function class_exists;
use function file_get_contents;
use function is_readable;
Expand All @@ -25,7 +26,10 @@ final class LaminasComponentInstallerIntegrationTest extends TestCase
*/
private function getComposerJsonPath(): string
{
return realpath(__DIR__ . '/../composer.json');
$path = realpath(__DIR__ . '/../composer.json');
assert($path !== '');

return $path;
}

/**
Expand Down

0 comments on commit 0fe2d78

Please sign in to comment.