@@ -18,65 +18,8 @@ protected function getRule(): Rule
1818 return new RegularExpressionPatternRule ();
1919 }
2020
21- public function testValidRegexPatternBefore73 (): void
22- {
23- if (PHP_VERSION_ID >= 70300 ) {
24- self ::markTestSkipped ('This test requires PHP < 7.3.0 ' );
25- }
26-
27- $ this ->analyse (
28- [__DIR__ . '/data/valid-regex-pattern.php ' ],
29- [
30- [
31- 'Regex pattern is invalid: Delimiter must not be alphanumeric or backslash in pattern: nok ' ,
32- 6 ,
33- ],
34- [
35- 'Regex pattern is invalid: Compilation failed: missing ) at offset 1 in pattern: ~(~ ' ,
36- 7 ,
37- ],
38- [
39- 'Regex pattern is invalid: Delimiter must not be alphanumeric or backslash in pattern: nok ' ,
40- 11 ,
41- ],
42- [
43- 'Regex pattern is invalid: Compilation failed: missing ) at offset 1 in pattern: ~(~ ' ,
44- 12 ,
45- ],
46- [
47- 'Regex pattern is invalid: Delimiter must not be alphanumeric or backslash in pattern: nok ' ,
48- 16 ,
49- ],
50- [
51- 'Regex pattern is invalid: Compilation failed: missing ) at offset 1 in pattern: ~(~ ' ,
52- 17 ,
53- ],
54- [
55- 'Regex pattern is invalid: Delimiter must not be alphanumeric or backslash in pattern: nok ' ,
56- 21 ,
57- ],
58- [
59- 'Regex pattern is invalid: Compilation failed: missing ) at offset 1 in pattern: ~(~ ' ,
60- 22 ,
61- ],
62- [
63- 'Regex pattern is invalid: Delimiter must not be alphanumeric or backslash in pattern: nok ' ,
64- 26 ,
65- ],
66- [
67- 'Regex pattern is invalid: Compilation failed: missing ) at offset 1 in pattern: ~(~ ' ,
68- 26 ,
69- ],
70- ],
71- );
72- }
73-
7421 public function testValidRegexPatternAfter73 (): void
7522 {
76- if (PHP_VERSION_ID < 70300 ) {
77- self ::markTestSkipped ('This test requires PHP >= 7.3.0 ' );
78- }
79-
8023 $ messagePart = 'alphanumeric or backslash ' ;
8124 if (PHP_VERSION_ID >= 80200 ) {
8225 $ messagePart = 'alphanumeric, backslash, or NUL ' ;
0 commit comments