I would recommend downloading PHPUnit 3 and installing it via the PEAR
installer.  If you do not have PEAR installed, go to
http://go-pear.net and copy the entire page (it's a PHP script).  Save
it to a php script.  Run the php script from the command line.  It
will ask you for some installation locations.  Since you're running
xampp or wamp, it'll likely be something like 

c:\program files\xampp\php\ or
c:\wamp\php\

After the install is done, it will mention there's a PEAR_ENV.reg file
in the PEAR directory you specified.  You can run this file from the
command line, or find it in explorer and double click it.  This should
set up the path to be able to run PEAR from anywhere.

You may need to close the command line window and open a new one to do
the rest:  

at the command prompt type

pear

This should show a bunch of options that pear can do.  If you don't
get this, you should add the path to pear.bat to your PATH environment
variable.

Once you can run PEAR from anywhere, run the following:

pear channel-discover pear.phpunit.de
pear install -alldeps phpunit/phpunit

This should install PHPunit 3 along with many of its optional
components.  Other things to install would be

xdebug
pear/testing_selenium

These will add additional functionality.  xdebug will allow you to
create code coverage reports (really cool) and testing_selenium along
with a selenium server will allow unit tests to be written that can
control the browser and test things that show up or happen in the
browser (very cool).

As for writing unit tests, Sebastian's site has plenty of tutorials
and examples that will help you get started.  http://phpunit.de/

Good luck.  Unit testing in PHP is excellent with PHPunit or
simpletest.  I highly recommend getting into the habit.

David

--- In [email protected], Mohamed Moustafa <[EMAIL PROTECTED]>
wrote:
>
> Please  how can I install  PHPUnit I'm usning PHP Version 5.2.1
(WAMP or XAMPP) 
> 
> I have many problem with it 
> 
> Please help 
> and also I need a good  idea how to use PHPUnit
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around 
> http://mail.yahoo.com 
> 
> [Non-text portions of this message have been removed]
>


Reply via email to