Per wikitech-l discussion: Move tests from maintenance/tests/ to tests/. They're...
[lhc/web/wiklou.git] / tests / phpunit / install-phpunit.sh
1 #!/bin/sh
2
3 if [ `id -u` -ne 0 ]; then
4 echo '*** ERROR' Must be root to run
5 exit 1
6 fi
7
8 if ( has_binary phpunit ); then
9 echo PHPUnit already installed
10 else if ( has_binary pear ); then
11 echo Installing phpunit with pear
12 pear channel-discover pear.phpunit.de
13 pear install phpunit/PHPUnit
14 else if ( has_binary apt-get ); then
15 echo Installing phpunit with apt-get
16 apt-get install phpunit
17 else if ( has_binary yum ); then
18 echo Installing phpunit with yum
19 yum install phpunit
20 fi
21 fi
22 fi
23 fi