Fix test suite, refactor bootstrap, resolve global paths and adding path constants to phpunit configuration