Phpunit with composer

This fixes ( Issue #9 ) and uses code from closed ( pull request #12 )