These are the standard operations that should be performed when working with this codebase:
composer lint # Run all linting tools
composer lint-fix # Automatically fix linting issues
composer test # Run PHPUnit tests without coverage
- Follow Drupal coding standards
- Use snake_case for variable names (e.g.,
$file_pathnot$filePath) - Use TRUE/FALSE constants (uppercase) rather than true/false
- Use NULL constant (uppercase) rather than null
- Maintain proper docblock annotations
- Uses PHPUnit 11.5 with configuration in phpunit.xml
- Coverage reports are generated in .logs/coverage directory
- Fullscreen screenshots use the resize algorithm (temporarily resizes browser window to capture full page)
- Updated autoloader from PSR-0 to PSR-4
- Made constants public as per PHP 8.2+ standards
- Improved error messages for file operations
- Optimized token replacement logic
- Updated PHPUnit configuration to remove deprecated attributes
- Ensured all variables follow Drupal's snake_case naming convention
The Behat Screenshot extension provides functionality to capture screenshots during Behat test runs. Its main components are:
- BehatScreenshotExtension: Handles configuration and service container integration
- ScreenshotContext: Provides Behat steps and screenshot capabilities, including fullscreen screenshot functionality
- Tokenizer: Processes dynamic filename generation with tokens
- Always run tests before and after changes
- Maintain existing code style and standards
- Fix PHPUnit deprecations as they arise
- Use verbose error messages to aid debugging