Skip to content

Commit

Permalink
Test webmozart/assert integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ondrejmirtes committed Jan 2, 2023
1 parent 8764bac commit 228820b
Show file tree
Hide file tree
Showing 4 changed files with 506 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/integration-tests.yml
Expand Up @@ -248,6 +248,12 @@ jobs:
cd e2e/integration/repo
composer install
../../../phpstan.phar analyse -c ../drupal.neon
- php-version: 8.1
script: |
git clone https://github.com/webmozarts/assert.git -b 1.11.0 --depth 1 e2e/integration/repo
cd e2e/integration/repo
composer install
../../../phpstan.phar analyse -l 9 tests/static-analysis -c ../webmozart.neon
steps:
- name: "Checkout"
Expand Down
36 changes: 36 additions & 0 deletions e2e/integration/webmozart-assert-baseline-lvl9.neon
@@ -0,0 +1,36 @@
parameters:
ignoreErrors:
-
message: "#^Parameter \\#1 \\$array of static method Webmozart\\\\Assert\\\\Assert\\:\\:allCount\\(\\) expects iterable\\<array\\|Countable\\>, iterable\\<array\\|Countable\\|null\\> given\\.$#"
count: 1
path: repo/tests/static-analysis/assert-count.php

-
message: "#^Parameter \\#1 \\$value of static method Webmozart\\\\Assert\\\\Assert\\:\\:allMaxLength\\(\\) expects iterable\\<string\\>, iterable\\<string\\|null\\> given\\.$#"
count: 1
path: repo/tests/static-analysis/assert-maxLength.php

-
message: "#^Parameter \\#1 \\$value of static method Webmozart\\\\Assert\\\\Assert\\:\\:allNotRegex\\(\\) expects iterable\\<string\\>, iterable\\<string\\|null\\> given\\.$#"
count: 1
path: repo/tests/static-analysis/assert-notRegex.php

-
message: "#^Parameter \\#1 \\$classOrObject of static method Webmozart\\\\Assert\\\\Assert\\:\\:allPropertyExists\\(\\) expects iterable\\<class\\-string\\|object\\>, iterable\\<class\\-string\\|object\\|null\\> given\\.$#"
count: 1
path: repo/tests/static-analysis/assert-propertyExists.php

-
message: "#^Function Webmozart\\\\Assert\\\\Tests\\\\StaticAnalysis\\\\preserveContainerAllArrayIterator\\(\\) should return ArrayIterator\\<string, string\\> but returns ArrayIterator\\<string, mixed\\>&iterable\\<string\\>\\.$#"
count: 1
path: repo/tests/static-analysis/assert-psalm-preserveContainerType.php

-
message: "#^Parameter \\#1 \\$value of static method Webmozart\\\\Assert\\\\Assert\\:\\:allRegex\\(\\) expects iterable\\<string\\>, iterable\\<string\\|null\\> given\\.$#"
count: 1
path: repo/tests/static-analysis/assert-regex.php

-
message: "#^Function Webmozart\\\\Assert\\\\Tests\\\\StaticAnalysis\\\\allNullOrThrows\\(\\) should return iterable\\<Closure\\> but returns iterable\\<Closure\\|null\\>\\.$#"
count: 1
path: repo/tests/static-analysis/assert-throws.php

0 comments on commit 228820b

Please sign in to comment.