We actually need a webserver in order to use SimpleTest.

This commit is contained in:
jgen 2014-02-17 16:57:46 -05:00
parent 6f057028b7
commit 58474d4bd3
3 changed files with 33 additions and 21 deletions

View file

@ -7,7 +7,15 @@ php:
# optionally specify a list of environments, for example to test different RDBMS
env:
- DB=mysql
- DB=pgsql
# - DB=pgsql
before_install:
- sudo apt-get update > /dev/null
install:
- sudo apt-get install -y --force-yes nginx php-fpm php5-mysql
- cp .travis_nginx.conf /etc/nginx/nginx.conf
/etc/init.d/nginx restart
# execute any number of scripts before the test run, custom env's are available as variables
before_script:

24
tests/.travis_nginx.conf Normal file
View file

@ -0,0 +1,24 @@
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
gzip on;
server {
listen 80;
root /;
location ~ \.php($|/) {
fastcgi_pass 127.0.0.1:9000;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_script_name;
include fastcgi_params;
}
}
}

View file

@ -1,20 +0,0 @@
<?php
require_once('lib/simpletest/autorun.php');
require_once('lib/simpletest/unit_tester.php');
require_once('lib/simpletest/reporter.php');
class ShimmieSimpleTestCase extends UnitTestCase {
var $options;
function ShimmieTestCase() {
$this->options = getopt("d:u:");
}
function testOptions() {
print_r($this->options);
$this->assertTrue(true);
}
}