INSTALLING PHPUNIT FOR PHP 5.3 ON ZENDSERVER

ZendServer installs PHP CLI as part of the installation, and, as is customary for PHP 4.3+, includes a PEAR installer. It’s a good idea to install PEAR before installing PHPUnit as per the recommendation here.

  1. Open Zend\ZendServer\bin\go-pear.bat and change the line:
    %PHP_BIN% -d output_buffering=0 -d PEAR\go-pear.pharto (see PHAR Runtime Configuration):%PHP_BIN% -d output_buffering=0 -d phar.require_hash=0 PEAR\go-pear.pharThis will stop the fatal error:phar...does not have a signatureas by default PHP will not process a PHAR archive without a signature.
  2. Run go-pear.bat

    For Windows 7, make sure you open the console as an administrator, or the installer won’t be able to create some folders in the default install locations. At the command prompt enter:#cd \program files\zend\zendserver\bin
    # go-pear.bat
    and you should get something like this (I selected the system-wide install and accepted the default locations):install pear

    If the installation succeeded, you should see something like:end of pear install

    Note that c:\program files\zend\zendserver\bin is already in Windows Path, thanks to ZendServer.

  3. Update PEAR Trying to install PHPUnit at this point will fail, complaining of an outdated installer. Update the PEAR package:# pear channel-update pear.php.net
    # pear upgrade pear
  4. Add the PHPUnit channels – see Installing PHPUnit
    # pear channel-discover pear.phpunit.de
    # pear channel-discover pear.symfony-project.com
  5. Finally install PHPUnit# pear install phpunit/PHPUnitIf the installation runs successfully you should see:installing phpunit

You can check your PHPUnit by running it from the command prompt:# phpunit

Advertisements

发表评论

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / 更改 )

Twitter picture

You are commenting using your Twitter account. Log Out / 更改 )

Facebook photo

You are commenting using your Facebook account. Log Out / 更改 )

Google+ photo

You are commenting using your Google+ account. Log Out / 更改 )

Connecting to %s