If a unit that started the phase with Unit Strength 10 or more is destroyed for any reason, all friendly units within 6" must immediately test for panic.
This covers situations such as when a unit is wiped out by missile fire, magic, close combat, pursuit or indeed any other occurrence. Leave the annihilated unit in place until the tests are taken in order to give a point to measure from.