This may not be the 'cleanest' solution, but it requires very little change to existing code. (Assumes that both regexes cannot match the same $sFunction. But I think that is implied by 'switch'.)
for ( $sFunction ) {
(/test1/ || /test2/) && do {
# ....
};
/test2/ && do {
# ....
};
}