Skip to content

Commit 2270a6b

Browse files
committed
Fix test expectations
1 parent 39b3dd7 commit 2270a6b

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

Diff for: composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
],
88
"require": {
99
"php": "^7.4 || ^8.0",
10-
"phpstan/phpstan": "^2.1.3"
10+
"phpstan/phpstan": "^2.1.11"
1111
},
1212
"conflict": {
1313
"nette/application": "<2.3.0",

Diff for: tests/Type/Nette/data/strings-match.php

+5-5
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,19 @@
99

1010
function (string $s): void {
1111
$result = Strings::match($s, '/%env\((.*)\:.*\)%/U');
12-
assertType('array{string, string}|null', $result);
12+
assertType('array{non-falsy-string, string}|null', $result);
1313

1414
$result = Strings::match($s, '/%env\((.*)\:.*\)%/U');
15-
assertType('array{string, string}|null', $result);
15+
assertType('array{non-falsy-string, string}|null', $result);
1616

1717
$result = Strings::match($s, '/(foo)(bar)(baz)/', PREG_OFFSET_CAPTURE);
18-
assertType("array{array{string, int<-1, max>}, array{'foo', int<-1, max>}, array{'bar', int<-1, max>}, array{'baz', int<-1, max>}}|null", $result);
18+
assertType("array{array{non-falsy-string, int<-1, max>}, array{'foo', int<-1, max>}, array{'bar', int<-1, max>}, array{'baz', int<-1, max>}}|null", $result);
1919

2020
$result = Strings::match($s, '/(foo)(bar)(baz)/');
21-
assertType("array{string, 'foo', 'bar', 'baz'}|null", $result);
21+
assertType("array{non-falsy-string, 'foo', 'bar', 'baz'}|null", $result);
2222

2323
$result = Strings::match($s, '/(foo)(bar)'. preg_quote($s) .'(baz)/');
24-
assertType("array{string, 'foo', 'bar', 'baz'}|null", $result);
24+
assertType("array{non-falsy-string, 'foo', 'bar', 'baz'}|null", $result);
2525
};
2626

2727
function (string $s): void {

0 commit comments

Comments
 (0)