Fixed unit tests and update to phpunit 4