Web Development

Continuous Integration is probably one the best things since Testing was developed. CakePHP, along with Symfony and Yii, is one of my favorite when it comes to PHP.

I do Continuous Integration with Circle CI . A fantastic service.

machine:
  php:
    version: 5.5.11
dependencies:
  post:
    - pear config-set auto_discover 1
    - pear install pear.phpunit.de/PHPUnit-3.7.32
    - echo "<?php
        class DATABASE_CONFIG {
        public \$test = array(
          'datasource' => 'Database/Mysql',
          'persistent' => false,
          'host' => '127.0.0.1',
          'login' => 'ubuntu',
          'password' => '',
          'database' => 'circle_test',
          'prefix' => ''
        );
        }" > app/Config/database.php
test:
  override:
    - php ./app/Console/cake.php test app AllModel

Notes

For MySQL, Circle CI uses circle_test and ubuntu as a default database and default user, respectively. Circle CI would use PHPUnit with your phpunit.xml if it sees it. However, you can override it like what I did above.