tenzap commented on issue #8082:
URL: https://github.com/apache/netbeans/issues/8082#issuecomment-2561930056

   For example, with phpunit 10.5
   
   ```
   $ vendor/bin/phpunit --help
   PHPUnit 10.5.40 by Sebastian Bergmann and contributors.
   
   Usage:
     phpunit [options] <directory|file> ...
   
   ```
   
   From what I understand in source code of phpunit 10.5
   
   - `[options]` from cli will override the one set in xml config file if it 
exists (as per the default search location of that file) or if its location is 
set by the corresponding command line argument.
   
       See: `Registry::init`  & `(new Merger)->merge($cliConfiguration, 
$xmlConfiguration);` which are initially called from Application::run()
       
https://github.com/sebastianbergmann/phpunit/blob/10.5.40/src/TextUI/Application.php#L100
       
https://github.com/sebastianbergmann/phpunit/blob/main/src/TextUI/Configuration/Registry.php#L109
       
   
   - `<directory|file>` (ie. like the `.` presently used by netbeans when 
querying groups, or like the test dir that is set when phpunit is invoked 
without ticking `Test project using just phpunit command`), they will also 
superseed the one in the xml config file.
   
       See `TestSuiteBuilder::build()`
       
https://github.com/sebastianbergmann/phpunit/blob/10.5.40/src/TextUI/Application.php#L397
       
https://github.com/sebastianbergmann/phpunit/blob/main/src/Framework/TestBuilder.php#L40
       
https://github.com/sebastianbergmann/phpunit/blob/main/src/TextUI/Configuration/TestSuiteBuilder.php#L42
   
   So netbeans could work like this!
   
   - if user checks/ticks `Test project using just phpunit command`, don't 
append the `<directory|file>`, the inclusions of the dirs would be determined 
as per the XML config file if set, or as per the phpunit default. Otherwise, 
`<directory|file>` should be the director(y/ies) set in the "project properties 
/ testing / test dirs" window of netbeans.
   
   - if user checks/ticks `Ask for test groups before running tests`, it should 
append the `<directory|file>` depending on whether `Test project using just 
phpunit command` is ticked. That's because one would want the list of groups 
for the tests that phpunit would run based on the way it is configured in 
netbeans.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to