-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathphp_version_test.php
38 lines (34 loc) · 1.26 KB
/
php_version_test.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<?php
require_once "config/config.php";
require_once "src/AbstractTest.php";
require_once "src/VersionExtensionTest.php";
require_once "src/ObsoleteCGIPHPTest.php";
require_once "src/ObsoletePHPXTest.php";
require_once "src/ObsoleteVersionExtensionTest.php";
require_once "src/ObsoleteHandlerTest.php";
require_once "src/HandlerTest.php";
require_once "src/NewHandlerTest.php";
require_once "src/NewVersionExtensionTest.php";
if (!isset($pvc_config)) {
throw new Exception('$pvc_config not set');
}
$test = array(
new eDschungel\VersionExtensionTest($pvc_config),
new eDschungel\HandlerTest($pvc_config),
new eDschungel\ObsoletePHPXTest($pvc_config),
new eDschungel\ObsoleteCGIPHPTest($pvc_config),
new eDschungel\ObsoleteVersionExtensionTest($pvc_config),
new eDschungel\ObsoleteHandlerTest($pvc_config),
new eDschungel\NewVersionExtensionTest($pvc_config),
new eDschungel\NewHandlerTest($pvc_config),
);
header("Content-Type: text/plain");
$nr_unexpected_versions = 0;
foreach ($test as $test_instance) {
$nr_unexpected_versions += $test_instance->performAllTests();
}
if ($nr_unexpected_versions === 0) {
print("No unexpected PHP version found.\n");
} else {
print("Found " . $nr_unexpected_versions . " unexpected PHP versions!\n");
}