Getting "Could not open input file" when trying to use PHPUnit with NetBeans and Xampp - netbeans

I just installed a fresh setup of NetBeans 7.0.1 and the latest Xampp package. When I click Tools > Create Unit Tests on a file or class I get the following error in the output:
Could not open input file: .\pear\PHPUnit2\TextUI\TestRunner.php
This file is present and I can run the phpunit.bat from Explorer. I've wasted over an hour trying to find out why this is happening... Has anyone else had this problem?
Steve

The latest PHPUnit is 3.5.15. Version 2 is extremely old. While it does appear that NetBeans is at least seeing phpunit.bat, you might want to see if you have two versions of PHPUnit installed.

You can always try to update the paths and make them absolute instead of relative:
"C:\xampp\php\.\php.exe" ".\pear\PHPUnit2\TextUI\TestRunner.php" %*
to something like this, minding your own file structure of course.
"C:\xampp\php\php.exe" "C:\xampp\php\PEAR\PHPUnit2\TextUI\TestRunner.php" %*

Related

Error in NS2 debugging using Eclipse: "Cant find a source file at... "

I am trying to debug NS-2.34 using Eclipse Luna 4.4.2 under Ubuntu 13.10, and I had successfully configured NS2 and Eclipse for debugging by following the instructions from here "https://erl1.wordpress.com/2012/01/11/using-ns-2-with-eclipse/." The problem is, when I start debugging, debugging will not continue due to the error
Can't find a source file at "/build/buildd/eglibc-2/17/elf/dl-debug.c"
Locate the file or edit the source lookup path to include its location
I tried to locate the file in my system but I can't seem to figure that part out. How can I solve this error?
I think that's one of the many reasons why a lot of people transfer from NS2 to NS3 when they find that the module they would like to use is available in NS3.
For your problem, the page you are referring to has been a long time ago and there might be conflicts caused by new version.
For me, as a ns2er, when I modified some code or add new files, I just do "make" command and see what I got in the terminal. It works in most of the time.
Cheers,
Zeyu

NetBeans 8.0.2, PHPUnit skeleton genertor 2.0.1 - phpunit tests were not generated for the following files

I'm trying to get a PHPUnit test generated via the NetBeans IDE. WHen I initiate the creation of a test, the output window shows:
"C:\xampp\php\pear\PHPUnit\phpunit-skelgen.bat" "--ansi" "generate-test" "PrintuiInterface" "C:\xampp\htdocs\unified\components\com_printui\interface\printui_interface.php" "PrintuiInterfaceTest" "C:\unittests\components\com_printui\interface\printui_interfaceTest.php"
phpunit-skelgen 2.0.1 by Sebastian Bergmann.
Done.
It seems successful but I also get a popup that states "Tests were not generated for the following files: printui_interface.php Review the log in Output window"
I've tried moving the 'unittests' directory to several different places, thinking it may be a permissions issue. I seem to get the same results no matter where I put the 'unittests' directory.
There are no errors in the PHP error log.
Any thoughts on how I can determine what is wrong would be greatly appreciated.
Best regards.

Where is the phpunit.php file?

I'm trying to set up Eclipse to be able to debug PHPUnit tests. I'm trying to follow the instructions here. It says to set up a new Run Configuration, and choose PHP script, and the php file should be phpunit.php
My problem is, I can't find that file anywhere! Does the new version of PHPUnit not come with such a file? How else can you debug the unit tests?
Thanks
The file that the IDE is looking for is a single file that can run all the tests. One convention in the PHPUnit community is to call that file AllTests.php.
Kristian from Denmark explains this in an article that covers more than that.
Hope this helps!

Error with zend installation on win 7

I am trying to install ZEND FRAMEWORK on my localhost but failing miserable. I am following the below mentioned steps but don't know where am I going wrong. Please help me with the same.
Steps are as follows that I followed:
Downloaded the ZEND Framework full package version 1.11.7 which is about 25 Mb in a zipped version and then unzipped it to a folder called ZendFrameWork.
Copied the ZendFramework folder inside my c:\xampp\php\
changed the "include_path = '.;\xampp\php\PEAR;\.;C:\xampp\php\ZendFramework\library' " in the php.ini file.
Then restarted the apache server.
EDIT :: I have successfully managed to get the zf command to run without any errors. but now, all it does is, after i enter "zf create myproject" it just gets stuck with the cursor blinking on the next line. And if i press CTRL+C, i get the message : Terminate batch job ? (Y/N)
Then set the environment variable for zf.bat file as " C:\xampp\php\ZendFramework\bin "
But when I try to execute the " zf create sampleProjName " from command line it does nothing, so then I used Windows Powershell and it gives the error which I have attached below.
Waiting for your response.
Thanks in advance.
Try using normal cmd - not powershell. Works fine for me.
Thanks for all your response.
I successfully installed Zend Framework.
I removed the full installation and replaced it with minimal installation and also I did not have php.exe set as an environment variable, so i did that too and also in the php.ini file i needed to write the zend library first before the pear one.
And this was it, TA-DA, it worked.
:)

Type Conversion to Dalvik format failed: Unable to execute dex: wrapper was not properly loaded first

I have had all sorts of bizarre errors, like the one in the title, happen when I am using the Android SDK and AVD Manager with Eclipse. Generally I just unplug the phone and plug it back in or close and reopen Eclipse but it is frustrating. Apparently Conversion to Dalvik format failed: Unable to execute dex: wrapper was not properly loaded first doesn't allow me to compile my app, i think it is because I was trying to run the emulator with some suggestions from emulator is so slow to no avail. thought i should add im running eclipse 3.5.2 on Ubuntu 11.04
Just restart the eclipse and run the project. The error arises while installing a new target version. After completion of the installation it will get fix automatically. Else restart eclipse.
I met with the same error on my Macbook. I tried one of the methods explained at this link http://techmologies.blogspot.com/2009/05/conversion-to-dalvik-format-failed-with_06.html and solved the problem.
Put the following 2 lines in the eclipse.ini file:
-vm
C:\Program Files\Java\jdk1.6.0_07\bin\javaw.exe
Please modify the 2nd line according to the actual situation.
If you have upgraded your SDK, and if you have not updated ADT plugin it will show this error. Please check it once by updating ADT plugin
I made a new installation of Eclipse in different folder(with the same SDK folder) and imported the code to the workspace & it started to work again.