Skip to content

Commit

Permalink
Merge pull request #22 from amouhzi/master
Browse files Browse the repository at this point in the history
Update tests dor travis
  • Loading branch information
amouhzi committed Jan 4, 2016
2 parents 236d89d + 6d3c6a9 commit 1f77f8c
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 1 deletion.
13 changes: 13 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,19 @@
sudo: true

language: php

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

Expand Down
18 changes: 18 additions & 0 deletions build/travis-ci-apache
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<VirtualHost *:80>
DocumentRoot %TRAVIS_BUILD_DIR%/tests/server/php-curl-test

<Directory "%TRAVIS_BUILD_DIR%">
Options FollowSymLinks MultiViews ExecCGI
AllowOverride All
Order deny,allow
Allow from all
</Directory>

# Wire up Apache to use Travis CI's php-fpm.
<IfModule mod_fastcgi.c>
AddHandler php5-fcgi .php
Action php5-fcgi /php5-fcgi
Alias /php5-fcgi /usr/lib/cgi-bin/php5-fcgi
FastCgiExternalServer /usr/lib/cgi-bin/php5-fcgi -host 127.0.0.1:9000 -pass-header Authorization
</IfModule>
</VirtualHost>
2 changes: 1 addition & 1 deletion tests/CurlTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
class CurlTest extends \PHPUnit_Framework_TestCase
{

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

/**
*
Expand Down

0 comments on commit 1f77f8c

Please sign in to comment.