Simpleat is to have another transformer say 12VAC. Connect the 2 primaries in series and connect the 12VAC to the one so that the centre tap is common. Then measure AC volts across the outer sides and see if it is 24VAC. If so then they are correctly phased. If it is 0V or very close ( depends on the winding imbalance of the 2 windings, ideally they should be identical but often are a few dozen turns different) then switch off and reverse one of the primary coil windings and try again, where you will get 24VAC.
Low voltage to test means you will not damage the transformer. You can also use this and measure the secondary side to get a rough idea of turns ratio and secondary voltages with an unmarked transformer.