Repository navigation
chore(tests) #81 Add missing tests (99% line coverage) - #88
Merged
Merged
Conversation
…e HTTP API, unit tests of every class Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes #81.
These tests found the regression of #84 fixed by #87 (merged).
Coverage: 1062/1070 lines (99.25%), 322 tests (from 2/1103 lines before #86).
Functional tests (
tests/Functional), on a test application (tests/App/TestKernel.php): the bundle and its dependencies (EasyAdmin, Doctrine, Security, Twig, Monolog, TwigComponent, process-bundle), a SQLite database recreated for each test, in-memory Messenger transports, a few test processes (direct launch, text / file launch forms, private, failing). Its own temporary directory per PHP process.SecurityTest: every UI page redirects anonymous users to the login page, login (valid / invalid password), logoutProcessListTest: public processes listed (not the private ones), "Users" menu reserved to admins, user localeLaunchActionTest: direct launch (message dispatched with theexecution_user), text form with UI defaults and context, file upload (saved inupload_directory), missing / unknown processProcessExecutionCrudTest,LogRecordCrudTest,ProcessScheduleCrudTest,UserCrudTest: CRUD pages, filters, "show logs" / "download log file" actions, schedule creation / edition / validation, worker warning, users reserved to admins, password confirmation, token generation (only its hash stored)HttpProcessExecuteTest: queued and synchronous executions, failing process, JSON body and context, unknown process (422), invalid / missing token (401), token generated in the UI then used on the APIUnit tests of every other class: DI extension and configuration, bundle,
UserCreateCommand, the 6 migrations (SQL per platform), entities and enums, managers, message handlers,CronScheduler,ProcessEventSubscriber, Monolog handlers, repositories (on the test application), HTTP value resolver, forms, EasyAdmin fields and filters, Twig extensions / runtimes, validators,LogoutController.Each test class declares the classes it covers and every class it runs (
CoversClass/UsesClass,beStrictAboutCoverageMetadata): checked with each test file run alone and with the whole suite in random order (no risky test). NoUsesNamespace(not available in PHPUnit 11, used by the CI on PHP 8.2).phpunit.xml.dist:memory_limitset to 512M, the suite peaks at about 125 MB (default limit: 128M); the functional tests run without debug.tests/App/config/reference.php, generated by Symfony when the test application boots, is ignored.Not covered (8 lines):
ProcessConfigurationsManager.php:87-91: unreachable with symfony/options-resolver 8 (bug, see below)ProcessExecutionCrudController.php:147:file_get_contents()emits a warning before returningfalseon a missing log file (bug, see below)LogLevelExtensionRuntime.php:42,48:matchlines inside a ternary, not reported by Xdebug although every arm is executedsrc/is unchanged: the issues found while writing these tests will be handled in dedicated issues.Requirements
Breaking changes
None (tests only).
🤖 Generated with Claude Code