1.8 KiB
1.8 KiB
Installing PHPUnit
Before the Unittest module will work, you need to install PHPUnit.
Installing on Windows/XAMPP
(written by bitshift, see this forum post)
Assuming xampp is installed to C:\xampp
, and that you have pear installed, do the following:
- Open a command prompt and go to C:\xampp\php
- Type
pear update-channels
(updates channel definitions) - Type
pear upgrade
(upgrades all existing packages and pear) - Type
pear channel-discover components.ez.no
(This is needed for PHPUnit) - Type
pear channel-discover pear.symfony-project.com
(Also needed by PHPUnit) - Type
pear channel-discover pear.phpunit.de
(This is the phpunit channel) - Type
pear install --alldeps phpunit/PHPUnit
(This actually installs PHPUnit and all dependencies)
[!!] You may have to edit memory_limit
in your php.ini
if you get some sort of memory error, just set it to something really large, then back when your done.
Please see this forum post for more information.
Installing on *nix
If any of these fail, try again with sudo, most of them require root priveledges.
- Install the 'php-pear' package.
- On Ubuntu/Debian type
sudo apt-get install php-pear
- On Ubuntu/Debian type
- Make sure Pear is up-to-date
- Type
pear update-channels
- Type
pear upgrade
- Type
- Add the required channels
- Type
pear channel-discover components.ez.no
- Type
pear channel-discover pear.symfony-project.com
- Type
pear channel-discover pear.phpunit.de
- Type
- Install PHPUnit itself
- Type
pear install --alldeps phpunit/PHPUnit
- Type
Class 'PHPUnit_Framework_TestSuite' not found
If you get this error than it means... I don't even know.