Skip to content

Commit e4e4eaa

Browse files
committed
E2E test for showing stub files errors even with restored result cache
1 parent 580d5f2 commit e4e4eaa

File tree

4 files changed

+28
-0
lines changed

4 files changed

+28
-0
lines changed

.github/workflows/e2e-tests.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,14 @@ jobs:
285285
- script: |
286286
cd e2e/bug-10483
287287
../../bin/phpstan
288+
- script: |
289+
cd e2e/stub-files-errors
290+
OUTPUT=$(../bashunit -a exit_code "1" "../../bin/phpstan")
291+
echo "$OUTPUT"
292+
../bashunit -a contains 'Method StubFiles\Foo::doFoo() has no return type specified.' "$OUTPUT"
293+
OUTPUT=$(../bashunit -a exit_code "1" "../../bin/phpstan")
294+
echo "$OUTPUT"
295+
../bashunit -a contains 'Method StubFiles\Foo::doFoo() has no return type specified.' "$OUTPUT"
288296
289297
steps:
290298
- name: "Checkout"

e2e/stub-files-errors/phpstan.neon

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
parameters:
2+
stubFiles:
3+
- stubs/test.stub
4+
paths:
5+
- src
6+
level: 8

e2e/stub-files-errors/src/test.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<?php
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?php
2+
3+
namespace StubFiles;
4+
5+
class Foo
6+
{
7+
8+
public function doFoo()
9+
{
10+
11+
}
12+
13+
}

0 commit comments

Comments
 (0)