4 * Simple command line script to fetch the correct PHPUnit release
7 $phpVersion = PHP_MAJOR_VERSION
. '.' . PHP_MINOR_VERSION
;
8 print "Running PHP $phpVersion\n";
10 switch ($phpVersion) {
12 $phpunit = 'phpunit-5.phar';
15 $phpunit = 'phpunit-6.phar';
20 $phpunit = 'phpunit-7.phar';
23 $phpunit = 'phpunit-7.phar';
24 // PHP 5 backward compatibility lock to PHPUnit 7 (type hinting)
27 $phpunit = 'phpunit-7.phar';
31 $url = "https://phar.phpunit.de/$phpunit";
32 $out = __DIR__
. '/phpunit.phar';
35 system("wget '$url' -O '$out'", $return);
36 if ($return !== 0) exit($return);
39 print "Downloaded $phpunit\n";