Pear and phpunit

less than 1 minute read

Update PEAR to the latest PHPUnit version


    sudo pear upgrade PEAR
    sudo pear config-set auto_discover 1
    sudo pear install pear.phpunit.de/PHPUnit
<div>
</div>
from http://stackoverflow.com/questions/1528717/phpunit-require-once-error the files are installed to

/usr/share/php

which should contain
<div>
</div><div>assure@snapdragonubuntu:/usr/share/php$ ls -al PHPUnit/
drwxr-xr-x  7 root root  4096 2012-01-17 14:28 .
-rw-r–r–  1 root root 13302 2012-01-17 14:28 Autoload.php
drwxr-xr-x  4 root root  4096 2012-01-17 14:28 Extensions
drwxr-xr-x  9 root root  4096 2012-01-17 14:28 Framework
drwxr-xr-x  2 root root  4096 2012-01-17 14:28 Runner
drwxr-xr-x  2 root root  4096 2012-01-17 14:28 TextUI
drwxr-xr-x  7 root root  4096 2012-01-17 14:28 Util


<div>The versions can be verified by</div><div>
</div><div><div>pear list -c phpunit</div><div>Installed packages, channel pear.phpunit.de:</div><div>============================================</div><div>Package            Version State</div><div>File_Iterator      1.3.1   stable</div><div>PHPUnit            3.6.7   stable</div><div>PHPUnit_MockObject 1.1.1   stable</div><div>PHP_CodeCoverage   1.1.2   stable</div><div>PHP_Invoker        1.0.1   stable</div><div>PHP_Timer          1.0.2   stable</div><div>PHP_TokenStream    1.1.3   stable</div><div>Text_Template      1.1.1   stable</div><div>
</div></div></div>
<div>Ensure the php.ini files have this path on the include path</div><div>
</div><div>    /etc/php5/apache2/php.ini</div><div>    /etc/php5/cli/php.ini</div><div>
</div><div>should both include the PEAR php share libraries</div><div>
</div><div><div>    ; UNIX: “/path1:/path2”</div><div>    include_path = “.:/usr/share/php”</div></div><div>
</div><div>
</div>

Categories:

Updated:

Leave a Comment