Friday, 12 October 2012

PHPUnit & Xdebug - Installation

Hi,

Default packages:
  1. Ubuntu:
    • sudo apt-get install php5-dev php-pear
    • sudo apt-get install php5-xdebug php5-dev
    • sudo apt-get install php-pear
    • sudo pear channel-discover pear.phpunit.de
    • sudo pear channel-discover components.ez.no
    • sudo pear channel-discover pear.symfony-project.com
    • sudo pear channel-discover pear.symfony.com
    • sudo pear update-channels
    • Uncomment of added in "/etc/php5/cli/php.ini":
      • include_path = ".:/usr/share/php"
  2. Centos:
    • yum install php-pear
    • yum install php-dom
    • yum install php-devel gcc
    • pear channel-discover pear.phpunit.de
    • pear channel-discover pear.symfony-project.com
    • pear channel-discover pear.symfony.com
    • pear channel-discover components.ez.no
    • pecl install xdebug
    • Added new file "/etc/php.d/xdebug.ini":
      • zend_extension=/usr/lib64/php/modules/xdebug.so
        • --OR--
      • extension=xdebug.so
    • Uncomment of added in "/etc/php.ini":
      • include_path = ".:/php/includes:/usr/share/pear:/usr/share/php"

Install latest PHPUnit:
  1. Ubuntu:
    • sudo apt-get remove phpunit
    • sudo pear install -a phpunit/PHPUnit
      • Testing: phpunit --version
  2. Centos:
    • pear install --alldeps phpunit/PHPUnit
      • Testing: phpunit --version

Downgrade current PHPUnit to 3.5.15:
  1. Uninstall current PHPUnit:
    • sudo pear uninstall phpunit/PHPUnit
    • sudo pear uninstall phpunit/DbUnit
    • sudo pear uninstall phpunit/PHP_CodeCoverage
    • sudo pear uninstall phpunit/File_Iterator
    • sudo pear uninstall phpunit/PHPUnit_MockObject
    • sudo pear uninstall phpunit/Text_Template
    • sudo pear uninstall phpunit/PHP_Invoker
    • sudo pear uninstall phpunit/PHP_TokenStream
    • sudo pear uninstall phpunit/PHP_Timer
    • sudo pear uninstall phpunit/PHPUnit_Selenium
    • sudo pear uninstall pear.symfony-project.com/YAML
  2. Install PHPUnit 3.5.15:
    • sudo pear clear-cache
    • sudo pear install pear.symfony-project.com/YAML-1.0.2
    • sudo pear install phpunit/PHPUnit_Selenium-1.0.1
    • sudo pear install phpunit/Text_Template-1.0.0
    • sudo pear install phpunit/PHPUnit_MockObject-1.0.3
    • sudo pear install phpunit/PHP_Timer-1.0.0
    • sudo pear install phpunit/File_Iterator-1.2.3
    • sudo pear install phpunit/PHP_TokenStream-1.0.1
    • sudo pear install phpunit/PHP_CodeCoverage-1.0.2
    • sudo pear install phpunit/DbUnit-1.0.0
    • sudo pear install phpunit/PHPUnit-3.5.15

Good luck!

No comments:

Post a Comment