it means that You have to go through some hardships with a person before you can call them a real friend.