Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: tests cleanup #126

Merged
merged 1 commit into from
Dec 1, 2024
Merged
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
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,15 +147,15 @@ to fix some issues as the project is not maintained anymore.
* Tests ([demo](https://www.strangebuzz.com/en/blog/introducing-the-microsymfony-application-template#h2_7))
* Unit test [example](https://github.com/strangebuzz/MicroSymfony/blob/main/tests/Unit/Helper/StringHelperTest.php)
* Integration test [example](https://github.com/strangebuzz/MicroSymfony/blob/main/tests/Integration/Twig/Extension/MarkdownExtensionTest.php)
* Functional test [example](https://github.com/strangebuzz/MicroSymfony/blob/main/tests/Functional/Controller/HelloWorldTest.php)
* Functional test [example](https://github.com/strangebuzz/MicroSymfony/blob/main/tests/Functional/Controller/ComposerActionTest.php)
* API test [example](https://github.com/strangebuzz/MicroSymfony/blob/main/tests/Api/Controller/SlugifyActionTest.php)
* E2E test [example](https://github.com/strangebuzz/MicroSymfony/blob/main/tests/E2E/Controller/AppControllerTest.php)
* Code coverage at 100% (configurable threshold)
* [Coverage report on Scrutinizer](https://scrutinizer-ci.com/g/strangebuzz/MicroSymfony/code-structure/main/code-coverage/src/)
* GitHub CI ([actions](https://github.com/strangebuzz/MicroSymfony/actions))
* [Tests job output](https://github.com/strangebuzz/MicroSymfony/actions/runs/11305753729/job/31445591745)
* [Lint job output](https://github.com/strangebuzz/MicroSymfony/actions/runs/11305753729/job/31445591463)
* [Security job output](https://github.com/strangebuzz/MicroSymfony/actions/runs/11305753729/job/31445591659)
* [Tests job output](https://github.com/strangebuzz/MicroSymfony/actions/runs/12099802785/job/33737745422)
* [Lint job output](https://github.com/strangebuzz/MicroSymfony/actions/runs/12099802785/job/33737745094)
* [Security job output](https://github.com/strangebuzz/MicroSymfony/actions/runs/12099802785/job/33737745205)
* Asset mapper+Stimulus ([documentation](https://symfony.com/doc/current/frontend/asset_mapper.html))
* Vanilla Js ([source](https://github.com/strangebuzz/MicroSymfony/blob/main/assets/controllers/hello_controller.js)) ([demo](https://microsymfony.ovh/stimulus))
* Fetch on a JSON endpoint of the application ([source](https://github.com/strangebuzz/MicroSymfony/blob/main/assets/controllers/api_controller.js)) ([demo](https://microsymfony.ovh/stimulus))
Expand Down
5 changes: 5 additions & 0 deletions tests/Functional/Controller/ComposerActionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@
#[CoversClass(ComposerAction::class)]
final class ComposerActionTest extends WebTestCase
{
/**
* This test is kept for the example, but this page is already tested by StaticRoutesSmokeTest.
*
* @see StaticRoutesSmokeTest
*/
public function testComposerPage(): void
{
$client = self::createClient();
Expand Down
20 changes: 0 additions & 20 deletions tests/Functional/Controller/HelloWorldTest.php

This file was deleted.

36 changes: 0 additions & 36 deletions tests/Functional/Controller/StaticActionTest.php

This file was deleted.

4 changes: 4 additions & 0 deletions tests/Integration/Twig/Extension/RoutingExtensionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@

final class RoutingExtensionTest extends KernelTestCase
{
/**
* Do not remove this test if you use the ctrl_fqcn() Twig helper and want to
* keep the 100% code coverage.
*/
public function testRoutingExtensionInvalidArgumentException(): void
{
self::bootKernel();
Expand Down
4 changes: 0 additions & 4 deletions tests/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
declare(strict_types=1);

use Symfony\Component\Dotenv\Dotenv;
use Symfony\Component\ErrorHandler\ErrorHandler;

require dirname(__DIR__).'/vendor/autoload.php';

Expand All @@ -16,6 +15,3 @@
if ($_SERVER['APP_DEBUG']) {
umask(0000);
}

// @see https://github.com/symfony/symfony/issues/53812#issuecomment-1977043255
set_exception_handler([new ErrorHandler(), 'handleException']);