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.
Hi! I have a small remark about PHPUnit UI. If the test is not passed, the message appears in the wrong encoding. And besides there is not enough space between the programmer's $message and system messages "Failed asserting that <.....". I use Windows-1251 encoding in my project. Thanks.
Created attachment 80883 [details] wrong encoding, not enough space
Would it be possible to get your PHPUnit XML log please? It can be found in your TMP directory (its name is "nb-
Could you please attach your PHPUnit log? Its name is nb-phpunit-log.xml and it can be found in TMP directory. Steps to get this file: - right click your project > Test - UI with test results appears - find the file in the temporary folder and attach it to this issue Thanks a lot.
Hello. I do not know what folder TMP? You mean the folder Windows\Temp or C:\Documents and Settings\Administrator\.nbi\tmp? In any case, I carried out the test again. And did not find the file on the entire hard drive. And also any other files like *phpunit*.xml I run NetBeans 6.7M3 on Windows XP SP3
> I do not know what folder TMP? You mean the folder Windows\Temp or > C:\Documents and Settings\Administrator\.nbi\tmp? For Windows, it will be likely something like "C:\DOCUME~1\<username>\LOCALS~1\Temp\". In any case, the name of the file is exactly "nb-phpunit-log.xml". I will try to reproduce myself later but your XML log would help a lot. One more idea - would it be possible to attach your unit test (or better the whole project) to this issue? I could try to run it and see what happens (what is the encoding you are using for your PHP files/project? UTF-8 or Windows-1251? You can verify it in Project Properties dialog). Thanks a lot.
Hello! The file was lying there, where you said. It's my mistake. Here it is.
Created attachment 81212 [details] test log
I'm using Windows-1251 encoding for PHP files.
Thanks for the file and information. So, if you open the XML log in an editor you will see that the message is "broken". So, unfortunately it's a "bug" in PHPUnit (using quotes because I think that one can hardly find out in which encoding a pure PHP file is saved). Please, could you try these steps and tell us whether it's OK or not? - create a new PHP project with UTF-8 encoding - create a PHP class - create a unit test for this class - run it My guess is that the message will be OK in such case. IMHO the problem here is that the XML log is in UTF-8 encoding but your PHP scrips are in Windows-1251 encoding... You can easily verify that yourself by running: phpunit --log-xml C:\phpunit.log /path/to/your/test/file in command line - is the output OK? If yes, is the XML log OK? Unfortunately, NetBeans cannot solve this issue, NetBeans just parses the XML log produced by PHPUnit. Looking at phpunit.de website, I'm not able to find any way how to tell PHPUnit that the message in the PHP script is not UTF-8 but Windows-1251. As I wrote earlier, if you try to use UTF-8 for your scripts, it should work I think (BTW why do you use Windows-1251 encoding and not UTF-8 which is recommended/preferred?). Keeping this issue opened but very likely will be closed as WONTFIX; but I will try to investigate more. Any ideas are welcome, of course. Thanks for reporting.
Ok. I've completed all the steps. - create a new PHP project with UTF-8 encoding - create a PHP class - create a unit test for this class - run it And hire is the result.
Created attachment 81245 [details] wrong encoding utf-8 project
Could you please attach the XML log again? Thanks.
Sure. Here's the new log.
Created attachment 81316 [details] wrong encoding utf-8 project
Looking into the XML file - now the message is correct (in the prevoius XML file it wasn't) - so I was right in my prevoius comments. Now I will investigate why the message is not properly displayed in the UI.
It works for me on Linux but does not on Windows...
Tell me if you need my help.
I found the problem and have fix for it, will push it soon. But please notice that your PHP projects _have to_ use UTF-8 encoding (reasons explained earlier, should not be problem because UTF-8 is highly recommended). Thanks for reporting this issue.
Fixed, please verify if possible. Thanks. http://hg.netbeans.org/web-main/rev/2458cb9468ab
Integrated into 'main-golden', will be available in build *200905140201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/2458cb9468ab User: Tomas Mysik <tmysik@netbeans.org> Log: #163633: PHPUnit message