We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a219124 commit 2adaf41Copy full SHA for 2adaf41
Tests/AbstractUnicodeTestCase.php
@@ -17,17 +17,22 @@ abstract class AbstractUnicodeTestCase extends AbstractAsciiTestCase
17
{
18
public static function provideWidth(): array
19
20
- return array_merge(
21
- parent::provideWidth(),
22
- [
23
- [1, '⚠'],
24
- [2, '⚠️'],
25
- [2, '1️⃣'],
26
- [14, '<<<END
+ $unicodeWidthTests = [
+ [1, '⚠'],
+ [2, '⚠️'],
+ [14, '<<<END
27
This is a
28
multiline text
29
END'],
30
- ]
+ ];
+
+ if (\PCRE_VERSION_MAJOR > 10 || \PCRE_VERSION_MAJOR === 10 && \PCRE_VERSION_MINOR >= 40) {
+ $unicodeWidthTests[] = [2, '1️⃣'];
31
+ }
32
33
+ return array_merge(
34
+ parent::provideWidth(),
35
+ $unicodeWidthTests
36
);
37
}
38
0 commit comments