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.

What about angular alternatives

What about angular alternatives

It’s my third post in “alternatives” series – this time i looked for something nicer then Angular . Apparently Angular went the same path like all good and slim solutions. It’s getting slower and bigger. With this type of framework we have at least couple of options:

Riot.js – nice React alternative

Riot.js – nice React alternative

Recently I’m looking for easier versions of popular libraries. There is a lot of buzz around Facebook React.js library, but i found it not especially user / developer friendly – at least at first glitch. Obviously some people says that it’s not so complicated, but… there is something super simple and super light – Riot.js .

interesting jQuery alternative – laroux.js

interesting jQuery alternative – laroux.js

If we are talking about jQuery alternatives there is not much on the market. With age jQuery put a little bit on weight, not mentioning it’s speed. If we are talking about weight and speed we have Zepto.js and… we can use pure JavaScript which isn’t especially convenient in larger  projects. But definitely it’s much more but… it’s faster.