You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by "KacerCZ (via GitHub)" <gi...@apache.org> on 2023/04/22 15:47:54 UTC

[GitHub] [netbeans] KacerCZ commented on pull request #5853: Fix for PHPUnit 10 #5790

KacerCZ commented on PR #5853:
URL: https://github.com/apache/netbeans/pull/5853#issuecomment-1518690084

   I tried to find way how to pass multiple files to PHPUnit, but there is no easy way.
   
   Possible solution could be inspired by https://github.com/infection/infection.
   It manipulates XML configuration for PHPUnit to suit its needs and creates temporary XML file.
   This file is then passed to PHPUnit with `-c`/`--configuration` parameter.
   See
   - https://github.com/infection/infection/pull/1547
   - https://github.com/infection/infection/blob/master/src/TestFramework/PhpUnit/Config/XmlConfigurationManipulator.php
   
   **Proposal**
   
   1. NetBeans creates temporary XML file
      - if config file exists (specified in dialog configuration or default file name) then it copies its content
      - relative paths in new file needs to be updated for new location
      - if config file does not exist it creates new one
   2. create its own test suite with unique name (https://docs.phpunit.de/en/10.1/configuration.html#the-testsuite-element)
   3. add files/directories to the suite
   4. run PHPUnit with parameters `--configuration` and `--testsuite` (https://docs.phpunit.de/en/10.1/textui.html) to test selected files
   
   What do you think?


-- 
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: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

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