adding tests for environment port number detection