Splitting registry and phpunit logic apart