Add module-specific assertions (Doctrine, Environment, Security, Session) - #246
Draft
TavoNiievez wants to merge 1 commit into
Draft
Add module-specific assertions (Doctrine, Environment, Security, Session)#246TavoNiievez wants to merge 1 commit into
TavoNiievez wants to merge 1 commit into
Conversation
Member
|
This PR replaces #218 |
…ion) Add high-level, actor-style assertions that rely on Symfony kernel and container integration and have no pure-Symfony equivalent. They belong to the see* / dontSee* family of the naming convention documented in CONTRIBUTING.md, which is extended here. - DoctrineAssertionsTrait: seeDoctrineDatabaseIsUp, seeDoctrineSchemaIsValid, seeDoctrineProxyDirIsWritable - EnvironmentAssertionsTrait (new): seeKernelEnvironmentIs, seeDebugModeEnabled, dontSeeDebugModeEnabled, seeSymfonyVersion, seeAppEnvAndDebugMatchKernel, seeAppCacheIsWritable, seeAppLogIsWritable, seeProjectStructureIsSane, seeEnvFileIsSynchronized, seeBundleIsEnabled, seeAssetManifestExists, seeKernelCharsetIs - SecurityAssertionsTrait: seeFirewallIsConfigured, seeRoleInHierarchy, seeSecretCanBeResolved - SessionAssertionsTrait: seeSessionSavePathIsWritable Register EnvironmentAssertionsTrait on the Symfony module facade and document the see* / assert* naming convention in CONTRIBUTING.md. Unit tests cover the methods exercisable against the test app under tests/_app. The remaining checks need a full Symfony project layout that the mini test app does not provide (seeProjectStructureIsSane, seeAssetManifestExists, seeEnvFileIsSynchronized, seeSecretCanBeResolved); per the two-layer test setup those belong in the companion Codeception/symfony-module-tests functional suite. Also stop the functional CI job from installing a second copy of the module into the app: it removed codeception/module-symfony with --no-update and then ran `composer install`, which reinstalls from the app's lockfile, so the module source under test and a stale released copy were both autoloaded.
TavoNiievez
force-pushed
the
new_asserts
branch
from
September 3, 2026 20:11
a25f101 to
f7a3627
Compare
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.
What
Adds high-level, actor-style assertions that rely on Symfony kernel/container integration and have no pure-Symfony equivalent. These belong to the
see*/dontSee*family of the naming convention documented inCONTRIBUTING.md(also extended here).Methods
seeDoctrineDatabaseIsUp,seeDoctrineSchemaIsValid,seeDoctrineProxyDirIsWritableseeKernelEnvironmentIs,seeDebugModeEnabled,dontSeeDebugModeEnabled,seeSymfonyVersion,seeAppEnvAndDebugMatchKernel,seeAppCacheIsWritable,seeAppLogIsWritable,seeProjectStructureIsSane,seeEnvFileIsSynchronized,seeBundleIsEnabled,seeAssetManifestExists,seeKernelCharsetIsseeFirewallIsConfigured,seeRoleInHierarchy,seeSecretCanBeResolvedseeSessionSavePathIsWritableRegisters
EnvironmentAssertionsTraiton theSymfonymodule facade and documents thesee*/assert*naming convention inCONTRIBUTING.md.Tests
Unit tests added for the methods exercisable against the test app (
tests/_app): Doctrine checks, the firewall check, Symfony-version/env-debug/project-dir environment checks.The remaining checks require a full real Symfony project layout that the mini unit-test app does not provide (
seeProjectStructureIsSane,seeAssetManifestExists,seeEnvFileIsSynchronized,seeSecretCanBeResolved); per the two-test-layer setup these are best covered in the companionCodeception/symfony-module-testsfunctional suite.Notes
Companion to #240, which contains the Symfony-mirroring
assert*/get*assertions. The two PRs touch disjoint files and can be reviewed/merged independently.