Skip to content

Commit 33db9f7

Browse files
authored
[CLEANUP] Ignore warnings for explicitly invalid values in tests (#1358)
1 parent c32ebc6 commit 33db9f7

File tree

3 files changed

+2
-12
lines changed

3 files changed

+2
-12
lines changed

config/phpstan-baseline.neon

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -119,15 +119,3 @@ parameters:
119119
identifier: argument.type
120120
count: 2
121121
path: ../tests/Unit/CSSList/CSSListTest.php
122-
123-
-
124-
message: '#^Parameter \#3 \$matchType of class Sabberworm\\CSS\\Parsing\\UnexpectedEOFException constructor expects ''count''\|''custom''\|''expression''\|''identifier''\|''literal''\|''search'', ''coding'' given\.$#'
125-
identifier: argument.type
126-
count: 1
127-
path: ../tests/Unit/Parsing/UnexpectedEOFExceptionTest.php
128-
129-
-
130-
message: '#^Parameter \#3 \$matchType of class Sabberworm\\CSS\\Parsing\\UnexpectedTokenException constructor expects ''count''\|''custom''\|''expression''\|''identifier''\|''literal''\|''search'', ''coding'' given\.$#'
131-
identifier: argument.type
132-
count: 1
133-
path: ../tests/Unit/Parsing/UnexpectedTokenExceptionTest.php

tests/Unit/Parsing/UnexpectedEOFExceptionTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ public function messageForInvalidMatchTypeRefersToTokenNotFound(): void
8585
$expected = 'tea';
8686
$found = 'coffee';
8787

88+
// @phpstan-ignore-next-line argument.type We're explicitly testing with an invalid value here.
8889
$exception = new UnexpectedEOFException($expected, $found, 'coding');
8990

9091
$expectedMessage = 'Token “' . $expected . '” (coding) not found. Got “' . $found . '”.';

tests/Unit/Parsing/UnexpectedTokenExceptionTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ public function messageForInvalidMatchTypeRefersToTokenNotFound(): void
8585
$expected = 'tea';
8686
$found = 'coffee';
8787

88+
// @phpstan-ignore-next-line argument.type We're explicitly testing with an invalid value here.
8889
$exception = new UnexpectedTokenException($expected, $found, 'coding');
8990

9091
$expectedMessage = 'Token “' . $expected . '” (coding) not found. Got “' . $found . '”.';

0 commit comments

Comments
 (0)