'L{IReactorCore.addSystemEventTrigger} should call triggers added to the
C{\'before\'} phase before it calls triggers added to the C{\'during\'}
phase.'

def test_beforePreceedsDuring(self):

    eventType = 'test'
    events = []
    def beforeTrigger():
        events.append('before')
    def duringTrigger():
        events.append('during')
    self.addTrigger('before', eventType, beforeTrigger)
    self.addTrigger('during', eventType, duringTrigger)
    self.assertEqual(events, [])
    reactor.fireSystemEvent(eventType)
    self.assertEqual(events, ['before', 'during'])
