Was this in a multi battle?
In which case if you choose not to play with your friends in multi battles in the maison you get the choice to use your friends ''friends'' Teams are chosen from a list and have nothing to do with your friend. When they go next to you to verse your opponents they will say things like:
(friends name) is my best friend!
my teacher is (friends name)
(friends name) is unstoppable!
Note these are not exact phrases used and i'm recalling this off memory so they're not 100% accurate. But they're somewhat along those lines.