This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
If I found the correct piece of code, then NetBeans invokes following command to run PHPUnit tests: phpunit --log-junit /tmp/nb-phpunit-log.xml NetBeansSuite /home/vriha/nbbuild6/php/phpunit/NetBeansSuite.php run=/var/www/PhpProject14/tests/CalcTest.php which fails with PHPUnit 3.7 with error msg: "More than two positional arguments provided". This message is used if condition on this [1] line is true. In case above, the array $this->options[1] contains following: [0] => NetBeansSuite [1] => /home/vriha/nbbuild6/php/phpunit/NetBeansSuite.php [2] => run=/var/www/PhpProject14/tests/CalcTest.php removing the "NetBeansSuite" argument from the command fixes the problem but I'm not sure what else this could cause. The array above is same with PHPUnit 3.6 so I tried to remove code between lines 518 and 525 in [2] and thus "simulate" 3.6 and it seems to work, all tests were executed. [1] https://github.com/sebastianbergmann/phpunit/blob/master/PHPUnit/TextUI/Command.php#L520 [2] https://github.com/sebastianbergmann/phpunit/blob/master/PHPUnit/TextUI/Command.php#L518
just a comment: I haven't found usage of options[1][2] where the actual CalcTest is. This argument seems to be used for NetBeansSuite.php and it wasn't problem until PHPUnit started to check number of parameters
Yes, I have investigated it as well and got to the same conclusion. So, as a hot fix for Beta, I will just remove the "NetBeansSuite" parameter. But this needs to be deeply investigated. Thanks.
Hot fixed. http://hg.netbeans.org/web-main/rev/8329ea6b2792
BTW I have reported an issue for PHPUnit [1]. [1] https://github.com/sebastianbergmann/phpunit/issues/655
Integrated into 'main-golden', will be available in build *201209200001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/8329ea6b2792 User: Tomas Mysik <tmysik@netbeans.org> Log: #218607 - PHPUnit 3.7 not working due to incorrect parameter
Fix looks OK, I tried code coverage, test creation (single file/folder), running tests (single test/folder) and it all looks fine (I reported issue 218675 for Skeleton Generator) Product Version: NetBeans IDE Dev (Build 201209200001) Updates: Updates available Java: 1.7.0_07; Java HotSpot(TM) Client VM 23.3-b01 System: Linux version 3.2.0-30-generic-pae running on i386; UTF-8; en_US (nb)
Láďo, since issue I have reported against PHPUnit [1] has been closed, can you please verify that PHPUnit 3.7.x works again even in NB 7.2? Thanks. [1] https://github.com/sebastianbergmann/phpunit/issues/655
(In reply to comment #7) > PHPUnit 3.7.x works again even in NB 7.2? Version 3.7.1 does not work so it will be likely part of 3.7.2.
I'll try it as soon as it is out. If it will work, do you think this fix still should go to patch?
I would backport it in any case - it is a simple change and we cannot push users to use the latest available version.
Transplanted. http://hg.netbeans.org/releases/rev/8311775882b1
Integrated into 'releases', will be available in build *201210100934* or newer. Wait for official and publicly available build. Changeset: http://hg.netbeans.org/releases/rev/8311775882b1 User: Tomas Mysik <tmysik@netbeans.org> Log: #218607 - PHPUnit 3.7 not working due to incorrect parameter (transplanted from 8329ea6b27927a51e605fb989df8bf45b357d943)
verified in patch Product Version: NetBeans IDE 7.2.1 (Build 201210100934) Java: 1.7.0_07; Java HotSpot(TM) Client VM 23.3-b01 System: Linux version 3.2.0-31-generic-pae running on i386; UTF-8; en_US (nb) (In reply to comment #7) > Láďo, since issue I have reported against PHPUnit [1] has been closed, can you > please verify that PHPUnit 3.7.x works again even in NB 7.2? I just noticed PHPUnit is in 3.7.7, I'll try it with NetBeans 7.2 later today
combination of PHPUnit 3.7.7 and NB 7.2 seems to be OK