I believe that was just in the movie. It was in Half-Blood Prince. While the trio were on their way back to Hogwarts from Hogsmeade, Harry and Ron were holding up a clumsily-walking Hermione, just before the whole thing with Katie Bell happened.
EDIT: Could have happened in the book also, I just remember seeing that part and being surprised that Butterbeer was alcoholic.