OpenConext / OpenConext/OpenConext-engineblock
Review test namespaces
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 17
- Forks
- 25
- Avg merge
- 4d 1h
- Merged PRs (30d)
- 1
Description
This issue is imported from pivotal - Originaly created at May 20, 2020 by Michiel Kodde
The test folder does not have an unambiguous namespace format. Some test namespaces include the Tests namespace, others dont. Adding the /Tests suffix messes with PSR autoloading (inspections). PHPUnit does not seem concerned with this at this point.
It might be a good idea to formalize the rules regarding test namespaces and syncronize all tests acording to those rules.
Other project projects have this tets namespace format:
Surfnet\ProjectName\Tests\Unit\Domain\ValueObject
With an underlying folder structure:
/project_root/tests/unit/Domain/ValueObject/SuperCoolTest.php
And a PSR-4 namespace definition:
"autoload-dev": {
"psr-4": {
"ProjectName\\Tests\\": "tests/"
}
}
This personally works for me, feel free to suggest another style!
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the test folder, existing test namespaces, and the composer.json autoload-dev PSR-4 definition described in the issue. Compare namespace declarations with their folder paths and identify the convention to formalize. Done means the rule is documented or agreed and the affected tests are synchronized without disrupting PSR autoloading.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- testing
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100