Ci

Easy deployment from GIT to FTP

I’m huge fan of Continuous Integration and all possible automation which can save me any time during development process. I’m using plenty of different tools in my daily work, but there is always place for something new.

Basically each decent IDE has FTP client build in, but sometimes you don’t have access to your IDE but obviously you got your code in GIT repository. If you are using Bitbucket or Github you are lucky – you can use FTPloy  . It’s super simple service, which gives you option to bind your repository with FTP server. After change is made – it deploys your files on the server. Nothing more, nothing less.

PHPUnit and CodeIgniter 3.0

PHPUnit and CodeIgniter 3.0

Quick tutorial how to setup proper unit testing with PHPUnit and CodeIgniter 3.0.
We need couple elements

  1. CodeIgniter – we are working with version 3.0rc3
  2. PHPUnit  – latest one

If you don’t have phpunit installed globally, you can go with composer, just add section to your composer.json

{
  "require-dev": {
    "phpunit/phpunit": "4.1.*"
  }
}

and then
composer.phar install
and after while we have
./vendor/bin/phpunit
working phpunit.

let’s create phpunit.xml.dist

next step will require create separate bootstrap file for PHPUnit. Just copy cp index.php tests/Bootstrap.php
We have to make 2 small amends.