@@ -19,35 +19,39 @@ public function testFetchingDeprecatedConst(): void
19
19
$ this ->markTestSkipped ('Required constants are not available, PHP≥8? ' );
20
20
}
21
21
22
+ $ expectedErrors = [];
23
+
24
+ if (PHP_VERSION_ID >= 70300 ) {
25
+ $ expectedErrors [] = [
26
+ 'Use of constant FILTER_FLAG_SCHEME_REQUIRED is deprecated since PHP 7.3. ' ,
27
+ 5 ,
28
+ ];
29
+ $ expectedErrors [] = [
30
+ 'Use of constant FILTER_FLAG_HOST_REQUIRED is deprecated since PHP 7.3. ' ,
31
+ 6 ,
32
+ ];
33
+ $ expectedErrors [] = [
34
+ 'Use of constant FILTER_FLAG_SCHEME_REQUIRED is deprecated since PHP 7.3. ' ,
35
+ 7 ,
36
+ ];
37
+ $ expectedErrors [] = [
38
+ 'Use of constant FILTER_FLAG_HOST_REQUIRED is deprecated since PHP 7.3. ' ,
39
+ 8 ,
40
+ ];
41
+ $ expectedErrors [] = [
42
+ 'Use of constant FILTER_FLAG_SCHEME_REQUIRED is deprecated since PHP 7.3. ' ,
43
+ 37 ,
44
+ ];
45
+ $ expectedErrors [] = [
46
+ 'Use of constant FILTER_FLAG_HOST_REQUIRED is deprecated since PHP 7.3. ' ,
47
+ 38 ,
48
+ ];
49
+ }
50
+
22
51
require_once __DIR__ . '/data/fetching-deprecated-const-definition.php ' ;
23
52
$ this ->analyse (
24
53
[__DIR__ . '/data/fetching-deprecated-const.php ' ],
25
- [
26
- [
27
- 'Use of constant FILTER_FLAG_SCHEME_REQUIRED is deprecated since PHP 7.3. ' ,
28
- 5 ,
29
- ],
30
- [
31
- 'Use of constant FILTER_FLAG_HOST_REQUIRED is deprecated since PHP 7.3. ' ,
32
- 6 ,
33
- ],
34
- [
35
- 'Use of constant FILTER_FLAG_SCHEME_REQUIRED is deprecated since PHP 7.3. ' ,
36
- 7 ,
37
- ],
38
- [
39
- 'Use of constant FILTER_FLAG_HOST_REQUIRED is deprecated since PHP 7.3. ' ,
40
- 8 ,
41
- ],
42
- [
43
- 'Use of constant FILTER_FLAG_SCHEME_REQUIRED is deprecated since PHP 7.3. ' ,
44
- 37 ,
45
- ],
46
- [
47
- 'Use of constant FILTER_FLAG_HOST_REQUIRED is deprecated since PHP 7.3. ' ,
48
- 38 ,
49
- ],
50
- ]
54
+ $ expectedErrors
51
55
);
52
56
}
53
57
0 commit comments