Skip to content

Commit 2a2fbbf

Browse files
committed
expectations
1 parent 3182497 commit 2a2fbbf

3 files changed

Lines changed: 18 additions & 1 deletion

File tree

.github/workflows/e2e-tests.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,10 @@ jobs:
2828
- script: |
2929
cd e2e/composer-version
3030
composer install
31-
vendor/bin/phpstan
31+
OUTPUT=$(../bashunit -a exit_code "1" "vendor/bin/phpstan --error-format=raw)
32+
echo "$OUTPUT"
33+
../bashunit -a contains 'test.php:12:Version requirement will always evaluate to false.' "$OUTPUT"
34+
../bashunit -a contains 'test.php:32:Version requirement will always evaluate to false.' "$OUTPUT"
3235
3336
steps:
3437
- name: Harden the runner (Audit all outbound calls)

e2e/composer-version/phpstan.neon

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
11
includes:
22
- phar://phpstan.phar/conf/bleedingEdge.neon
3+
4+
parameters:
5+
level: 5

e2e/composer-version/test.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<?php
22

33
use PHPUnit\Framework\Attributes\RequiresPhp;
4+
use PHPUnit\Framework\Attributes\RequiresPhpunit;
45

56
class A extends \PHPUnit\Framework\TestCase {
67
#[RequiresPhp('<=8.2.0')]
@@ -21,3 +22,13 @@ class D extends \PHPUnit\Framework\TestCase {
2122
#[RequiresPhp('^8.1.0')]
2223
public function testFoo() {}
2324
}
25+
26+
class E extends \PHPUnit\Framework\TestCase {
27+
#[RequiresPhpunit('^12.0.0')]
28+
public function testFoo() {}
29+
}
30+
31+
class F extends \PHPUnit\Framework\TestCase {
32+
#[RequiresPhpunit('^11.0.0')]
33+
public function testFoo() {}
34+
}

0 commit comments

Comments
 (0)