'L{UnixApplicationRunner.setupEnvironment} writes the daemonized
process\'s PID to the file specified by the C{pidfile} parameter if
C{nodaemon} is C{False}.'

def test_daemonPIDFile(self):

    pidfile = self.mktemp()
    with AlternateReactor(FakeDaemonizingReactor()):
        self.runner.setupEnvironment(None, '.', False, None, pidfile)
    with open(pidfile, 'rb') as f:
        pid = int(f.read())
    self.assertEqual(pid, (self.pid + 1))
