Skip to content

Commit 0eb53d2

Browse files
committed
fix(behat): make the CI green
1 parent 5fe1f79 commit 0eb53d2

File tree

7 files changed

+42
-12
lines changed

7 files changed

+42
-12
lines changed

.github/workflows/behat.yml

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ jobs:
3030
deps: [ highest, lowest ]
3131
env:
3232
DATABASE_URL: 'sqlite:///%kernel.project_dir%/var/data.db'
33+
USE_DAMA_DOCTRINE_TEST_BUNDLE: 1
34+
USE_PHP_84_LAZY_OBJECTS: 1
35+
MONGO_URL: ''
3336
steps:
3437
- name: Checkout code
3538
uses: actions/checkout@v3
@@ -59,25 +62,25 @@ jobs:
5962
SYMFONY_REQUIRE: ${{ matrix.symfony }}
6063

6164
- name: "Main test suite: reset DB at scenario level, with Dama support"
62-
run: vendor/bin/behat
65+
run: vendor/bin/behat --colors -vvv
6366

6467
- name: "Main test suite: reset DB at scenario level, without Dama support"
65-
run: vendor/bin/behat --profile=main-no-dama
68+
run: vendor/bin/behat --colors -vvv --profile=main-no-dama
6669

6770
- name: "Main test suite: reset DB at scenario level, with native Dama extension"
68-
run: vendor/bin/behat --profile=main-native-dama --tags='~@skip-with-native-dama'
71+
run: vendor/bin/behat --colors -vvv --profile=main-native-dama --tags='~@skip-with-native-dama'
6972

7073
- name: Manual reset DB
71-
run: vendor/bin/behat --profile=reset-manual
74+
run: vendor/bin/behat --colors -vvv --profile=reset-manual
7275

7376
- name: Manual reset DB and Dama support
74-
run: vendor/bin/behat --profile=reset-manual-dama
77+
run: vendor/bin/behat --colors -vvv --profile=reset-manual-dama
7578

7679
- name: Reset DB at feature level
77-
run: vendor/bin/behat --profile=reset-feature
80+
run: vendor/bin/behat --colors -vvv --profile=reset-feature
7881

7982
- name: Reset DB at feature level with Dama support
80-
run: vendor/bin/behat --profile=reset-feature-dama
83+
run: vendor/bin/behat --colors -vvv --profile=reset-feature-dama
8184

8285
- name: Reset DB disabled
83-
run: vendor/bin/behat --profile=reset-disabled
86+
run: vendor/bin/behat --colors -vvv --profile=reset-disabled

.github/workflows/phpunit.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,9 @@ jobs:
130130
if: contains(matrix.database, 'mysql')
131131
run: sudo /etc/init.d/mysql start
132132

133+
- name: Install Behat
134+
run: composer bin behat install
135+
133136
- name: Test
134137
run: ./phpunit
135138
shell: bash
@@ -204,6 +207,9 @@ jobs:
204207
if: contains(matrix.database, 'mysql')
205208
run: sudo /etc/init.d/mysql start
206209

210+
- name: Install Behat
211+
run: composer bin behat install
212+
207213
- name: Test
208214
run: |
209215
./phpunit --testsuite reset-database --bootstrap tests/bootstrap-reset-database.php
@@ -250,6 +256,9 @@ jobs:
250256
symfony/phpunit-bridge \
251257
symfony/framework-bundle
252258
259+
- name: Install Behat
260+
run: composer bin behat install
261+
253262
- name: Test
254263
run: |
255264
vendor/bin/phpunit tests/Unit
@@ -291,6 +300,9 @@ jobs:
291300
run: composer require brianium/paratest --dev
292301
shell: bash
293302

303+
- name: Install Behat
304+
run: composer bin behat install
305+
294306
- name: Test
295307
run: vendor/bin/paratest --processes 1 --configuration phpunit-paratest.xml.dist
296308
shell: bash
@@ -343,6 +355,9 @@ jobs:
343355
env:
344356
SYMFONY_REQUIRE: 8.0.x
345357

358+
- name: Install Behat
359+
run: composer bin behat install
360+
346361
- name: Test with coverage
347362
run: ./phpunit --coverage-text --coverage-clover coverage.xml
348363
shell: bash

bin/tools/behat/composer.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55
"friends-of-behat/mink-extension": "^2.0",
66
"friends-of-behat/symfony-extension": "^2.0",
77
"symfony/flex": "^2.10",
8-
"yceruto/behat-extension": "^1.0"
8+
"yceruto/behat-extension": "^1.0.2",
9+
"symfony/polyfill-php84": "^1.33",
10+
"symfony/polyfill-php85": "^1.33"
911
},
1012
"config": {
1113
"allow-plugins": {

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
"symfony/framework-bundle": "^6.4|^7.0|^8.0",
4848
"symfony/maker-bundle": "^1.55",
4949
"symfony/phpunit-bridge": "^6.4.26|^7.0|^8.0",
50+
"symfony/polyfill-php80": "^1.16",
5051
"symfony/routing": "^6.4|^7.0|^8.0",
5152
"symfony/runtime": "^6.4|^7.0|^8.0",
5253
"symfony/translation-contracts": "^3.4",

docs/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2702,7 +2702,7 @@ Installation
27022702
27032703
$ composer require --dev behat/behat friends-of-behat/symfony-extension
27042704
2705-
2. Enable the Foundry extension in your ``behat.yml``:
2705+
2. Enable the Foundry extension in your ``behat.yaml``:
27062706

27072707
.. code-block:: yaml
27082708

src/Test/Behat/FoundryTableNode.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public static function create(
5353
return $tableNode;
5454
}
5555

56-
public function getRowAsString(int $rowNum): string
56+
public function getRowAsString($rowNum): string
5757
{
5858
$values = [];
5959
foreach ($this->getRow($rowNum) as $column => $value) {
@@ -63,7 +63,7 @@ public function getRowAsString(int $rowNum): string
6363
return sprintf('|%s|', implode('|', $values));
6464
}
6565

66-
public function getRowAsStringWithWrappedValues(int $rowNum, callable $wrapper): string
66+
public function getRowAsStringWithWrappedValues($rowNum, $wrapper): string
6767
{
6868
$values = [];
6969
foreach ($this->getRow($rowNum) as $column => $value) {

symfony.lock

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,15 @@
88
"ref": "dfc51177476fb39d014ed89944cde53dc3326d23"
99
}
1010
},
11+
"doctrine/annotations": {
12+
"version": "1.14",
13+
"recipe": {
14+
"repo": "github.com/symfony/recipes",
15+
"branch": "main",
16+
"version": "1.10",
17+
"ref": "64d8583af5ea57b7afa4aba4b159907f3a148b05"
18+
}
19+
},
1120
"doctrine/deprecations": {
1221
"version": "1.1",
1322
"recipe": {

0 commit comments

Comments
 (0)