Oh yes, I think they have a sense of humor!
I was grooming my sister-in-law's horse who was being cranky, while she was cleaning up a bit. Every time she'd go out of sight, her horse would pick up her rear foot and shake it at me like she was going to kick. As soon as she'd re-appear, her horse would have all 4 feet on the ground standing there like the most perfect angel ever.
It went on for like 20 minutes until I realized what was going on (I was ignoring it, she wouldn't actually kick) and then we tested her out a bit. My sister-in-law walked in and out and in and out of the tack shed and yup, perfect lil angel when Mommy was watching, lil turd threatening to kick when she wasn't!