language: php

php:
  - 5.5
  - 5.6
  - hhvm-nightly

env:
  - DB=mysql

matrix:
  allow_failures:
    - php: hhvm-nightly

before_script:
  - composer --prefer-source --dev install
  - cp phpunit.xml.dist phpunit.xml
  - cp settings.default.php settings.php
  - if [[ "$DB" == "mysql" ]]; then mysql -e "create database IF NOT EXISTS dbmng2;" -uroot; fi
  - if [[ "$DB" == "mysql" ]]; then mysql dbmng2 < sql/dbmng2.sql -uroot; fi
  - if [[ "$DB" == "mysql" ]]; then mysql dbmng2 < sql/test.sql -uroot; fi

language: php

php:
  - 5.5
  - 5.6
  - hhvm-nightly

env:
  - DB=mysql

matrix:
  allow_failures:
    - php: hhvm-nightly

before_script:
  - sudo apt-get install apache2
  - sudo a2enmod rewrite
  - sudo service apache2 restart
  - ln -s ../dbmng2 /var/www/
  - composer --prefer-source --dev install
  - cp phpunit.xml.dist phpunit.xml
  - cp settings.default.php settings.php
  - if [[ "$DB" == "mysql" ]]; then mysql -e "create database IF NOT EXISTS dbmng2;" -uroot; fi
  - if [[ "$DB" == "mysql" ]]; then mysql dbmng2 < sql/dbmng2.sql -uroot; fi
  - if [[ "$DB" == "mysql" ]]; then mysql dbmng2 < sql/test.sql -uroot; fi

Install apache and dbmng2 (for testing api)
Install apache and dbmng2 (for testing api)
