TargetGenerator paths don't respect PSR 4
Subject of the issue
TargetGenerator doesn't take baseTestNamespace and autoload configuration when generating file name.
Your environment
- version of
phpunitgen/core: 3.1.0 - version of
phpunitgen/console: 5.0.0
Steps to reproduce
-
Set
baseTestNamespaceto'Tests\Unit'inphpunitgen.php -
Set
composer.jsonautoload-devto"autoload-dev": { "psr-4": { "Tests\\": "testing" } }, -
Generate a unit test without specifying a base path.
Expected behavior
TargetGenerator should use Composer autoload-dev config to determine the path where to create the generated unit test files when a target path isn't specified on command-line.
TargetGenerator should also base file path based on baseTestNamespace.
Actual behavior
The test file path doesn't contains Unit and the file is created in tests folder instead of testing. The generated test doesn't respect PSR4.
@landure I don't have the time to manage this for now, as I'm working on other OOS. PR welcome on this.
Closing as I'm archiving the project. See the https://github.com/paul-thebaud/phpunitgen-core/issues/32.