In this case the test was "substantive speech". IANAL, but my layman's understanding is that in order for some action to be protected under free speech laws it has to intentionally communicating some coherent message.
So, for example, if I was kicked out of a restaurant for not wearing shoes I couldn't generally claim free speech protections for my lack of footwear. However if I did so as part of some theoretical organized protest involving shoes then I could, as in the second case my unshod state was clearly intended to convey some message.
Except you don't have free speech protections in restaurants; they're private establishments that are free to restrict speech as they see fit, provided they are not discriminating on the basis of your membership in a protected class.
A restaurant can kick you out for whatever. You only have free speech rights against the government.
As to "substantive speech," the bar is low. Substantive in this case means just that it communicates a meaning. The meaning doesn't have to be important. Physical expression, like wearing shoes, involves a higher bar.
So, for example, if I was kicked out of a restaurant for not wearing shoes I couldn't generally claim free speech protections for my lack of footwear. However if I did so as part of some theoretical organized protest involving shoes then I could, as in the second case my unshod state was clearly intended to convey some message.