Skip to content

Commit

Permalink
fix: phpunit
Browse files Browse the repository at this point in the history
  • Loading branch information
maxhelias committed Apr 3, 2024
1 parent 9ed2add commit c941fa9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ jobs:
SYMFONY_REQUIRE: ${{ matrix.symfony }}

- name: Run tests
run: composer test
run: composer test${{ matrix.coverage == 'none' && '' || '-coverage' }}

- name: Monitor coverage
if: matrix.coverage != 'none'
Expand Down
5 changes: 3 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"symfony/http-kernel": "^5.4 || ^6.4 || ^7.0"
},
"require-dev": {
"phpunit/phpunit": "^11.0",
"phpunit/phpunit": "^10.5 || ^11.0",
"symfony/browser-kit": "^5.4 || ^6.4 || ^7.0",
"symfony/yaml": "^5.4 || ^6.4 || ^7.0"
},
Expand All @@ -54,6 +54,7 @@
"sort-packages": true
},
"scripts": {
"test": "vendor/bin/phpunit --coverage-clover=coverage-report.xml"
"test": "vendor/bin/phpunit",
"test-coverage": "vendor/bin/phpunit --coverage-clover=coverage-report.xml"
}
}
6 changes: 1 addition & 5 deletions tests/Functional/FunctionalTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,14 @@ class FunctionalTest extends WebTestCase
{
protected ?KernelBrowser $client;

protected ?ContainerInterface $container;

protected function setUp() : void
{
$this->client = self::createClient();

$this->container = $this->client->getContainer();
}

public function testServiceWiring()
{
$service = $this->container->get(KernelEventSubscriber::class);
$service = self::getContainer()->get(KernelEventSubscriber::class);
self::assertInstanceOf(KernelEventSubscriber::class, $service);
}

Expand Down

0 comments on commit c941fa9

Please sign in to comment.