-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Description
Describe the bug
i18n.php file cannot be loaded in Gherkin tests due to incorrect file path resolution in Gherkin.php loader.
To Reproduce
Steps to reproduce the behavior:
- Configure Codeception 5.0 with Gherkin and i18n support
- Create Gherkin feature files with localized steps
- Run tests using
codecept run - See error: "Failed opening required '.../i18n.php'"
Expected behavior
Successful loading of i18n.php for Gherkin localization support.
Screenshots/Code Snippets
Problematic code in vendor/codeception/codeception/src/Codeception/Test/Loader/Gherkin.php:77:
$i18n = require $gherkinClassPath . '/../../../i18n.php';
Proposed Fix
$i18n = require $gherkinClassPath . '/../i18n.php';
Environment
- Codeception version: 5.0.x
- PHP Version: 8.2
- Operating System: debian 12
- Installation type: Composer
Additional context
The incorrect relative path breaks Gherkin's internationalization support. The correct path should resolve to:
src/Codeception/Test/Loader/../i18n.php instead of navigating three directories up. This matches the actual file structure in the Codeception repository.
Metadata
Metadata
Assignees
Labels
No labels