Skip to content

Commit c8bc4ad

Browse files
committed
tests the lowest version
1 parent 0c82a97 commit c8bc4ad

File tree

3 files changed

+27
-12
lines changed

3 files changed

+27
-12
lines changed

.github/workflows/ci.yml

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,26 @@ permissions:
1010
contents: read
1111

1212
jobs:
13+
lowest-version-tests:
14+
name: Build lowest version
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- name: Set up PHP
19+
uses: shivammathur/setup-php@v2
20+
with:
21+
php-version: '8.3'
22+
extensions: bcmath, gmp, intl, dom, mbstring
23+
24+
- name: Checkout code
25+
uses: actions/checkout@v4
26+
27+
- name: Download dependencies
28+
run: composer update --prefer-stable --prefer-dist --no-interaction --no-progress --no-suggest --prefer-lowest --classmap-authoritative
29+
30+
- name: Run tests
31+
run: vendor/bin/phpunit tests
32+
1333
tests:
1434
name: Build
1535
runs-on: ubuntu-latest
@@ -27,7 +47,7 @@ jobs:
2747
ini-values: zend.assertions=1
2848

2949
- name: Checkout code
30-
uses: actions/checkout@v3
50+
uses: actions/checkout@v4
3151

3252
- name: Validate composer.json and composer.lock
3353
run: composer validate --strict

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"minimum-stability": "stable",
77
"require": {
88
"php": ">=8.3",
9-
"symfony/form": "^7.3",
9+
"symfony/form": "^6.4|^7.0",
1010
"symfony/framework-bundle": "^6.4|^7.0"
1111
},
1212
"require-dev": {

tests/Integration/FormFlowBasicTest.php

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,7 @@ public function testFormFlow(): void
99
$client = self::createClient();
1010
$crawler = $client->request('GET', '/basic');
1111

12-
self::assertResponseIsSuccessful();
13-
self::assertResponseFormatSame('html');
14-
self::assertResponseStatusCodeSame(200);
12+
self::assertSame(200, $client->getInternalResponse()->getStatusCode());
1513
self::assertStringContainsString('>Step1<', $crawler->html());
1614
self::assertSameFileContent('step1.html', $client->getInternalResponse()->getContent());
1715

@@ -20,9 +18,7 @@ public function testFormFlow(): void
2018
'multistep[navigator][next]' => '',
2119
]);
2220

23-
self::assertResponseIsSuccessful();
24-
self::assertResponseFormatSame('html');
25-
self::assertResponseStatusCodeSame(200);
21+
self::assertSame(200, $client->getInternalResponse()->getStatusCode());
2622
self::assertStringContainsString('>Step2<', $crawler->html());
2723
self::assertSameFileContent('step2.html', $crawler->filter('body')->html());
2824

@@ -32,9 +28,7 @@ public function testFormFlow(): void
3228
'multistep[navigator][next]' => '',
3329
]);
3430

35-
self::assertResponseIsSuccessful();
36-
self::assertResponseFormatSame('html');
37-
self::assertResponseStatusCodeSame(200);
31+
self::assertSame(200, $client->getInternalResponse()->getStatusCode());
3832
self::assertStringContainsString('>Step3<', $crawler->html());
3933
self::assertSameFileContent('step3.html', $crawler->filter('body')->html());
4034

@@ -45,7 +39,8 @@ public function testFormFlow(): void
4539
'multistep[navigator][finish]' => '',
4640
]);
4741

48-
self::assertResponseRedirects('/basic/success', 302);
42+
self::assertSame(302, $client->getInternalResponse()->getStatusCode());
43+
self::assertSame('/basic/success', $client->getInternalResponse()->getHeader('Location'));
4944
}
5045

5146
private static function assertSameFileContent(string $expectedFilename, string $actualContent, bool $save = false): void

0 commit comments

Comments
 (0)