Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Fixes the issue with paths in `groups` section when `codeception.yaml` is not in the root of the project #5674
We run codeception as
codecept -g x -c tests/_data/codeception.yaml
And we have the following group:
groups: x: ../../tests/unit/SomeTest.php
Such path is resolved to
Also, I've added an ability to use absolute paths:
groups: x: /path/to/project/tests/unit/SomeTest.php
We need it to integrate Codeception with Infection.
Related to infection/infection#45
Also, use `realpath()` to make it possible to correctly use paths to files from the `codeception.yaml` located not in the root of the project. Example: Imagine, custom `codeception.yaml` is located inside `tests/_data` folder. We run codeception as ```bash codecept -g x -c tests/_data/codeception.yaml ``` And we have the following group: ```yaml groups: x: ../../tests/unit/SomeTest.php ``` Such path is resolved to `/path/to/project/tests/_data/../../tests/unit/SomeTest.php` and `GroupManager.php` can not match this path with the real path: ``` /path/to/project/tests/unit/SomeTest.php ``` Applying `realpath()` solves the issue.
@maks-rafalko try using
I think that these tests could be failing because they use made-up file names, so