Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 23 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,13 @@ jobs:
matrix:
php: [8.2, 8.3, 8.4, 8.5]
symfony: ["5.4.*", "6.4.*", "6.4wApi", "7.3.*", "7.4.*"]
include:
- php: 8.4
symfony: "8.0.*"
- php: 8.5
symfony: "8.0.*"
env:
only_sf_latest: &only_sf_latest ${{ matrix.symfony == '7.4.*' }}
only_sf_latest: &only_sf_latest ${{ matrix.symfony == '8.0.*' }}

steps:
- name: Checkout code
Expand Down Expand Up @@ -75,8 +80,15 @@ jobs:
key: ${{ runner.os }}-php-${{ matrix.php }}-composer-${{ hashFiles('**/composer.{json,lock}') }}
restore-keys: ${{ runner.os }}-php-${{ matrix.php }}-composer-

- name: Install PHPUnit 10
run: composer require --dev --no-update phpunit/phpunit:^10.0
- name: Install PHPUnit
env:
MATRIX_SYMFONY: ${{ matrix.symfony }}
run: |
if [[ "$MATRIX_SYMFONY" == "8.0.*" ]]; then
composer require --dev --no-update phpunit/phpunit:^12.5
else
composer require --dev --no-update phpunit/phpunit:^10.0
fi

- name: Install dependencies
env:
Expand Down Expand Up @@ -111,7 +123,14 @@ jobs:
working-directory: framework-tests

- name: Install PHPUnit in framework-tests
run: composer require --dev --no-update phpunit/phpunit:^10.0
env:
MATRIX_SYMFONY: ${{ matrix.symfony }}
run: |
if [[ "$MATRIX_SYMFONY" == "8.0.*" ]]; then
composer require --dev --no-update phpunit/phpunit:^12.5
else
composer require --dev --no-update phpunit/phpunit:^10.0
fi
working-directory: framework-tests

- name: Prepare Symfony sample
Expand Down
4 changes: 2 additions & 2 deletions src/Codeception/Module/Symfony/FormAssertionsTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ trait FormAssertionsTrait
public function assertFormValue(string $formSelector, string $fieldName, string $value, string $message = ''): void
{
$node = $this->getClient()->getCrawler()->filter($formSelector);
$this->assertNotEmpty($node, sprintf('Form "%s" not found.', $formSelector));
$this->assertNotCount(0, $node, sprintf('Form "%s" not found.', $formSelector));

$values = $node->form()->getValues();
$this->assertArrayHasKey(
Expand All @@ -47,7 +47,7 @@ public function assertFormValue(string $formSelector, string $fieldName, string
public function assertNoFormValue(string $formSelector, string $fieldName, string $message = ''): void
{
$node = $this->getClient()->getCrawler()->filter($formSelector);
$this->assertNotEmpty($node, sprintf('Form "%s" not found.', $formSelector));
$this->assertNotCount(0, $node, sprintf('Form "%s" not found.', $formSelector));

$values = $node->form()->getValues();
$this->assertArrayNotHasKey(
Expand Down
2 changes: 2 additions & 0 deletions src/Codeception/Module/Symfony/RouterAssertionsTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ public function invalidateCachedRouter(): void
* $I->seeCurrentActionIs('PostController::index');
* $I->seeCurrentActionIs('HomeController');
* ```
*
* @param non-empty-string $action
*/
public function seeCurrentActionIs(string $action): void
{
Expand Down