The Prelims:
- Start a new project in Netbeans and extract J!1.5 to the source directory.
- Run through the Joomla installation process.
Get the Unit Test from Joomla! SVN.
- Checkout the unittest from the Joomla! SVN repository.
- Navigate Teams->Subversion->Checkout
- Put the following into the "Specify the location of Subversion Repository"
http://joomlacode.org/svn/joomla/testing/trunk/1.5/unittest
- Put 'anonymous' into the username field.
- click "Next"
After you have done that you should be connected to the repository, if not, you'll have to try again. Now we need to specify what we want to check out.
- In the Repository Folder(s) field put:
testing/trunk/1.5/unittest
- After that, where it says "Local Folder", browse to the root your local Joomla installation.
- Then click finish.
Netbeans will ask you if you want to create a project for your checkedout unit tests. You could have done this here instead of at the beginning if you like. Also note that you have a new directory called 'unittest'.
Many of you have probably gotten this far by yourself! CONGRATS!
Configuring The Project Properties
Now we need to configure the Project Properties and tell it where to find the 'bootstrap.php' file and 'phpunit.xml' configuration file.
- So go ahead and right click on your newly created Joomla Project and scroll down to Properties.
- For both of the locations mentioned above just navigate to both of them (they are both in the 'unittest' directory in your Joomla project)
- Having done that, just click 'OK'.
You should be good to go! Try it yourself. You need to test a file that has a test written for it. I picked /libraries/joomla/base/object.php for mine and it worked like a charm.
Good luck all!
You can "How to Get it Running" on the Joomla Wiki.