def METHOD_NAME(config,
                                                             test_emitter,
                                                             test_registry_source_manager,
                                                             mocker,
                                                             capsys):
    config_class = config.__class__
    config_file = config.filepath
    mocker.patch.object(config_class, '_read_configuration_file', side_effect=config_class.ConfigurationError)
    updates = dict(domain=TEMPORARY_DOMAIN)
    with pytest.raises(config_class.ConfigurationError):
        get_or_update_configuration(emitter=test_emitter,
                                    config_class=config_class,
                                    filepath=config_file,
                                    updates=updates)
    configure.handle_missing_configuration_file.assert_not_called()
    config._write_configuration_file.assert_not_called()
    configure.handle_invalid_configuration_file.assert_called()
    captured = capsys.readouterr()
    assert INVALID_CONFIGURATION_FILE_WARNING.format(filepath=config_file) in captured.out