Skip to content

Commit 1f77f8c

Browse files
committed
Merge pull request #22 from amouhzi/master
Update tests dor travis
2 parents 236d89d + 6d3c6a9 commit 1f77f8c

File tree

3 files changed

+32
-1
lines changed

3 files changed

+32
-1
lines changed

.travis.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,19 @@
1+
sudo: true
2+
13
language: php
24

35
before_script:
6+
- sudo apt-get update
7+
- sudo apt-get install apache2 libapache2-mod-fastcgi
8+
# enable php-fpm
9+
- sudo cp ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.conf.default ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.conf
10+
- sudo a2enmod rewrite actions fastcgi alias
11+
- echo "cgi.fix_pathinfo = 1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
12+
- ~/.phpenv/versions/$(phpenv version-name)/sbin/php-fpm
13+
# configure apache virtual hosts
14+
- sudo cp -f build/travis-ci-apache /etc/apache2/sites-available/default
15+
- sudo sed -e "s?%TRAVIS_BUILD_DIR%?$(pwd)?g" --in-place /etc/apache2/sites-available/default
16+
- sudo service apache2 restart
417
- composer self-update
518
- composer install --dev --prefer-source
619

build/travis-ci-apache

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<VirtualHost *:80>
2+
DocumentRoot %TRAVIS_BUILD_DIR%/tests/server/php-curl-test
3+
4+
<Directory "%TRAVIS_BUILD_DIR%">
5+
Options FollowSymLinks MultiViews ExecCGI
6+
AllowOverride All
7+
Order deny,allow
8+
Allow from all
9+
</Directory>
10+
11+
# Wire up Apache to use Travis CI's php-fpm.
12+
<IfModule mod_fastcgi.c>
13+
AddHandler php5-fcgi .php
14+
Action php5-fcgi /php5-fcgi
15+
Alias /php5-fcgi /usr/lib/cgi-bin/php5-fcgi
16+
FastCgiExternalServer /usr/lib/cgi-bin/php5-fcgi -host 127.0.0.1:9000 -pass-header Authorization
17+
</IfModule>
18+
</VirtualHost>

tests/CurlTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
class CurlTest extends \PHPUnit_Framework_TestCase
66
{
77

8-
const TEST_URL = 'http://php-curl-test.anezi.net';
8+
const TEST_URL = 'http://localhost';
99

1010
/**
1111
*

0 commit comments

Comments
 (0)