def setupStartProcessWithLog(setupBasicExecutable, mocker):
    """ Setup required for testing startProcessWithLog.

    It mocks:

    - Writing a ConfigParser configuration
    - ``subprocess.Popen``
    - Opening files

    Returns:
        tuple: (mFile, mPopen, mConfigParserWrite) where ``mFile`` is the mock for opening a file, ``mPopen`` is the mock
            for ``subprocess.Popen(...)``, and ``mConfigParserWrite`` is the mock for writing a ``configparser`` config.
    """
    # For standard processes
    # Mock the subprocess command
    mPopen = mocker.MagicMock(return_value = "Fake value")
    mocker.patch("overwatch.base.deploy.subprocess.Popen", mPopen)
    # For supervisor processes
    # Mock write with the config parser
    mConfigParserWrite = mocker.MagicMock()
    mocker.patch("overwatch.base.deploy.ConfigParser.write", mConfigParserWrite)
    # Shared by both
    # Mock opening the log or config file
    mFile = mocker.mock_open()
    mocker.patch("overwatch.base.deploy.open", mFile)

    return mFile, mPopen, mConfigParserWrite