Skip to content
This repository was archived by the owner on Oct 2, 2019. It is now read-only.

Commit 34ed390

Browse files
committed
Stop using PEAR version of PHPUnit. Use git cloning instead. Closes zendframework#471
1 parent fbb3862 commit 34ed390

File tree

2 files changed

+39
-13
lines changed

2 files changed

+39
-13
lines changed

tests/php52_install_dependencies.sh

Lines changed: 35 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,47 @@
11
#!/bin/sh
22

3-
# To install DbUnit, we have to install everything
4-
pear channel-discover pear.phpunit.de
5-
pear channel-discover pear.symfony-project.com
6-
pear update-channels
7-
83
# remove any existing phpunit packages
94
pear uninstall -n pear.phpunit.de/PHPUnit
105
pear uninstall -n pear.phpunit.de/PHP_CodeCoverage
116
pear uninstall -n pear.phpunit.de/PHPUnit_MockObject
127
pear uninstall -n pear.phpunit.de/File_Iterator
138
pear uninstall -n pear.phpunit.de/Text_Template
149
pear uninstall -n pear.phpunit.de/PHP_Timer
15-
pear uninstall -n pear.symfony-project.com/YAML
10+
11+
# Install PHPUnit from git (only possibility for PHPUnit 3.6)
12+
cd tests
13+
mkdir phpunit && cd phpunit
14+
git clone git://github.com/sebastianbergmann/phpunit.git
15+
git clone git://github.com/sebastianbergmann/dbunit.git
16+
git clone git://github.com/sebastianbergmann/php-file-iterator.git
17+
git clone git://github.com/sebastianbergmann/php-text-template.git
18+
git clone git://github.com/sebastianbergmann/php-code-coverage.git
19+
git clone git://github.com/sebastianbergmann/php-token-stream.git
20+
git clone git://github.com/sebastianbergmann/php-timer.git
21+
git clone git://github.com/sebastianbergmann/phpunit-mock-objects.git
22+
git clone git://github.com/sebastianbergmann/phpunit-selenium.git
23+
git clone git://github.com/sebastianbergmann/phpunit-story.git
24+
git clone git://github.com/sebastianbergmann/php-invoker.git
25+
26+
# last versions without anonymous functions
27+
cd dbunit && git checkout 1.1 && cd ..
28+
cd php-code-coverage && git checkout 1.1 && cd ..
29+
cd php-file-iterator && git checkout 1.3.2 && cd ..
30+
cd php-invoker && git checkout 1.1.1 && cd ..
31+
cd php-text-template && git checkout 1.1.2 && cd ..
32+
cd php-timer && git checkout 1.0.3 && cd ..
33+
cd php-token-stream && git checkout 1.1.4 && cd ..
34+
cd phpunit && git checkout 3.6 && cd ..
35+
cd phpunit-mock-objects && git checkout 1.1 && cd ..
36+
cd phpunit-selenium && git checkout 1.1 && cd ..
37+
cd phpunit-story && git checkout 1.0.0 && cd ..
38+
39+
cd phpunit
40+
41+
php -d include_path='.:../phpunit/:../dbunit/:../php-code-coverage/:../php-file-iterator/:../php-invoker/:../php-text-template/:../php-timer:../php-token-stream:../phpunit-mock-objects/:../phpunit-selenium/:../phpunit-story/:/usr/local/lib/php' ../phpunit/phpunit.php --version
42+
43+
cd ..
44+
cd ..
1645

1746
# memcache 2.1.0 is the last version to support the php 5.2 branch
1847
pecl download memcached-2.1.0
@@ -23,9 +52,3 @@ printf "\n" | phpize
2352

2453
printf "\n" | pecl uninstall memcache
2554
printf "\n" | pecl install memcache
26-
27-
# Install
28-
pear install -o pear.phpunit.de/PHPUnit
29-
pear install pear.phpunit.de/DbUnit
30-
31-

tests/runalltests.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,10 @@
4343
echo "PHPUnit is not executable ($PHPUNIT)";
4444
}
4545

46-
if ($_SERVER['TRAVIS_PHP_VERSION'] != '5.2') {
46+
if ($_SERVER['TRAVIS_PHP_VERSION'] == '5.2') {
47+
//PHPUnit from git clone
48+
$PHPUNIT = 'php -d include_path=\'.:./phpunit/phpunit/:./phpunit/dbunit/:./phpunit/php-code-coverage/:./phpunit/php-file-iterator/:./phpunit/php-invoker/:./phpunit/php-text-template/:./phpunit/php-timer:./phpunit/php-token-stream:./phpunit/phpunit-mock-objects/:./phpunit/phpunit-selenium/:./phpunit/phpunit-story/:/usr/local/lib/php\' ./phpunit/phpunit/phpunit.php';
49+
} else {
4750
$PHPUNIT = '../bin/phpunit'; //PHPUnit from composer
4851
}
4952

0 commit comments

Comments
 (0)