Regeneration is a normal process. It's not an indication that something is wrong with your emissions system. Therefore, you will not fail if it kicks in to regeneration while stationary (but as others have pointed out, the newest flashes prevent this from happening). It should be noted that it's primarily a matter of safety.
Now, if you're in CONSTANT regeneration, then that MIGHT be an indication that something's wrong.
In California, I've read that it will be a plug-in test combined with a VISUAL smoke test and an inspection for unauthorized (read: non-CARB approved modifications).