language: php
php:
    - 5.3
    - 5.4
    - 5.5

before_script:
    # - sudo apt-get update
    # - sudo apt-get install -y --force-yes apache2 libapache2-mod-php5 php5-mysql php5-curl
    # - sudo sed -i -e "s,/var/www,$(pwd)/web,g" /etc/apache2/sites-available/default
    # - export HOSTNAME=localhost
    # - export MINK_EXTENSION_PARAMS='base_url=http://$HOSTNAME/app_test.php'

    # - sudo sed -i -e "/DocumentRoot/i\ServerName $HOSTNAME" /etc/apache2/sites-available/default
    # - echo "127.0.0.1    $HOSTNAME" | sudo tee -a /etc/hosts

    # - sudo /etc/init.d/apache2 restart
    - phpenv config-add .travis.php.ini
    - composer install --dev --prefer-dist > /dev/null
    - app/console do:da:cr -e=test > /dev/null
    - app/console do:sc:cr -e=test > /dev/null
    - chmod -R 777 app/cache app/logs

    # - export DISPLAY=:99
    # - wget http://selenium.googlecode.com/files/selenium-server-standalone-2.28.0.jar
    # - java -jar selenium-server-standalone-2.28.0.jar > /dev/null &
    # - sh -e /etc/init.d/xvfb start
    # - sleep 5

script:
    - bin/phpspec run -fpretty --verbose
    - bin/behat --no-snippets --verbose
