SpongeBob SquarePants
Buried in Time / Enchanted Tiki Dreams
S7 E19:
SpongeBob, Patrick and Squidward get locked in a time capsule. SpongeBob and Patrick build a dream world for Squidward.