Moved unit testing to codeception

Codeception still uses PHPUnit, just provides better testing utilities
Bug fixed and passing unit tests