Install PHPUnit to work with NetBeans in Windows 2


phpunit-logo-300x267PHPUnit is the de-facto standard for unit testing in PHP projects. It provides both a framework that makes the writing of tests easy as well as the functionality to easily run the tests and analyse their results.

  1. Install PEAR
    1. Download go-pear.phar
    2. Run
      php go-pear.phar
  2. Install PHPUnit
    1. If using a local installation, we should use pear.bat instead of pear
    2. pear clear-cache
      pear install -a -f phpunit/PHPUnit
  3. Install PHPUnit-SkeletonGenerator 
    pear install phpunit/PHPUnit_SkeletonGenerator
  4. Configure and check with NetBeans

About NhocConan

A super lazy guy who tries to write tech blog entries in English.He is lazy, so he can only write when he is in a good mood or when he is tired of coding.

Leave a comment

Your email address will not be published. Required fields are marked *

2 thoughts on “Install PHPUnit to work with NetBeans in Windows

  • Warren

    Step 2 fails with:

    c:\php5>pear install -a -f phpunit/PHPUnit
    Attempting to discover channel “phpunit”…
    Attempting fallback to https instead of http on channel “phpunit”…
    unknown channel “phpunit” in “phpunit/PHPUnit”
    invalid package name/package file “phpunit/PHPUnit”
    install failed