Pages

Sunday, November 11, 2012

Installing PHP Unit/Nothing to Upgrade error message

First of all we need to install PEAR as stated in my post

http://itfeast.blogspot.in/2012/11/installing-pear.html

Now that we have installed PEAR if success we will notice a PEAR folder in our php directory

also in our PHP directory will find a PEAR command line interface file

We need to place this a windows root path so that we can execute or files from everywhere for this refer

http://itfeast.blogspot.in/2012/11/adding-php-and-phpunit-to-windows.html


Now...

Installing PHP Unit

Fire the following command
pear channel-discover pear.phpunit.de
 
followed by
pear install phpunit/PHPUnit
 
wait for a few time depending on your internet speed phpunit will get downloaded and installed
 
If you get something similar to this you are done with phpunit installation 
 
C:\wamp\bin\php\php5.4.3>pear channel-discover pear.phpunit.de
Adding Channel "pear.phpunit.de" succeeded
Discovery of channel "pear.phpunit.de" succeeded

C:\wamp\bin\php\php5.4.3>pear install phpunit/PHPUnit
Unknown remote channel: pear.symfony.com
Did not download optional dependencies: phpunit/PHP_Invoker, use --alldeps to
wnload automatically
phpunit/PHPUnit requires package "channel://pear.symfony.com/Yaml" (version >=
.1.0)
phpunit/PHPUnit can optionally use package "phpunit/PHP_Invoker" (version >= 1
.0)
phpunit/PHPUnit_MockObject can optionally use PHP extension "soap"
downloading File_Iterator-1.3.3.tgz ...
Starting to download File_Iterator-1.3.3.tgz (5,152 bytes)
.....done: 5,152 bytes
downloading Text_Template-1.1.4.tgz ...
Starting to download Text_Template-1.1.4.tgz (3,701 bytes)
...done: 3,701 bytes
downloading PHP_CodeCoverage-1.2.6.tgz ...
Starting to download PHP_CodeCoverage-1.2.6.tgz (155,960 bytes)
...done: 155,960 bytes
downloading PHP_Timer-1.0.4.tgz ...
Starting to download PHP_Timer-1.0.4.tgz (3,694 bytes)
...done: 3,694 bytes
downloading PHPUnit_MockObject-1.2.2.tgz ...
Starting to download PHPUnit_MockObject-1.2.2.tgz (20,347 bytes)
...done: 20,347 bytes
downloading PHP_TokenStream-1.1.5.tgz ...
Starting to download PHP_TokenStream-1.1.5.tgz (9,859 bytes)
...done: 9,859 bytes
install ok: channel://pear.phpunit.de/File_Iterator-1.3.3
install ok: channel://pear.phpunit.de/Text_Template-1.1.4
install ok: channel://pear.phpunit.de/PHP_Timer-1.0.4
install ok: channel://pear.phpunit.de/PHP_TokenStream-1.1.5
install ok: channel://pear.phpunit.de/PHP_CodeCoverage-1.2.6
install ok: channel://pear.phpunit.de/PHPUnit_MockObject-1.2.2

C:\wamp\bin\php\php5.4.3> 
 

Now there are times we get an error while updating phpunit "Unabable to update PHP UNIT"

Message comes "Nothing to upgrade"

Follow following steps to upgrade phpunit in such cases

pear clear -cache

pear install -a-- phpunit/phpunit

and phpunit will upgrade successfully

1 comment:

  1. Good article

    https://wordpress-special-plugin.blogspot.co.id

    ReplyDelete