Added tests for the factories that return entities and moved phpunit configuration to the root folder.