Skip to content

Commit

Permalink
Make work tests on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
erikn69 authored Feb 16, 2023
1 parent 9f058e0 commit 7fbdebf
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions tests/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,7 @@
if (!function_exists('getLaravelVersion')) {
function getLaravelVersion()
{
exec("composer show 'illuminate/database' | grep 'versions' | grep -o -E '\*\ .+' | cut -d' ' -f2 | cut -d',' -f1;", $output);
$output = str_replace('v', '', isset($output[0]) ? $output[0] : '0.0');
$version = explode('.', $output);

if (!is_numeric($version[0])) {
return 0.0;
}

return (float) "$version[0].$version[1]";
return (float) \Composer\InstalledVersions::getVersion('illuminate/database');
}
}
if (!function_exists('getPHPVersion')) {
Expand Down

0 comments on commit 7fbdebf

Please sign in to comment.