'The parameters for spawnProcess stored in the endpoint are passed when
the endpoint\'s connect method is invoked.'

def test_spawnProcess(self):

    environ = {'HOME': None}
    memoryReactor = MemoryProcessReactor()
    ep = endpoints.ProcessEndpoint(memoryReactor, '/bin/executable', ['/bin/executable'], {'HOME': environ['HOME']}, '/runProcessHere/', 1, 2, True, {3: 'w', 4: 'r', 5: 'r'})
    d = ep.connect(self.factory)
    self.successResultOf(d)
    self.assertIsInstance(memoryReactor.processProtocol, endpoints._WrapIProtocol)
    self.assertEqual(memoryReactor.executable, ep._executable)
    self.assertEqual(memoryReactor.args, ep._args)
    self.assertEqual(memoryReactor.env, ep._env)
    self.assertEqual(memoryReactor.path, ep._path)
    self.assertEqual(memoryReactor.uid, ep._uid)
    self.assertEqual(memoryReactor.gid, ep._gid)
    self.assertEqual(memoryReactor.usePTY, ep._usePTY)
    self.assertEqual(memoryReactor.childFDs, ep._childFDs)
