Because of concerns about performance-enhancing drugs in sports, and attention-impairing drugs in the workplace, it is becoming more and more common to require people to be tested for drugs, commonly by giving a urine sample. The "cup" is a small plastic jar, with a tight-fitting screw cap, and a label for writing the name of the person and the date of the sample.
"Tinkle" is one of a number of euphemisms for "urinate." It is an example of a "nursery word," a word that is used by parents talking to children... which makes it acceptable in informal talk among friends.
So, the authorities running a sports event might say "you must submit a urine sample." Later, talking to friends, the athlete might say "They made me tinkle in a cup."