File: bootstrap.php

package info (click to toggle)
php-shellcommand 1.7.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 164 kB
  • sloc: php: 714; makefile: 6
file content (22 lines) | stat: -rw-r--r-- 723 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<?php
/**
 * Utility method to check the version of PHPUnit.
 *
 * Example: phpUnitVersion('<', '8.3'); // true e.g. for 8.2.1
 *
 * @param string $operator an operator like '>', '<', etc.
 * @param string $version the version to check against
 * @return bool whether PHPUnit matches the version to check
 */
function phpUnitVersion($operator, $version)
{
    $phpUnitVersion = class_exists('\PHPUnit\Runner\Version') ?
        call_user_func(array('\PHPUnit\Runner\Version', 'id')) :
        call_user_func(array('\PHPUnit_Runner_Version', 'id'));
    return version_compare($phpUnitVersion, $version, $operator);
}

require __DIR__ . '/../vendor/autoload.php';

// Default in some installations
setlocale(LC_CTYPE, 'C');