It has been a tough stretch for Caroline Wozniacki.

About two weeks ago Rory McIlroy ended his engagement with Wozniacki, breaking up with the Danish tennis star shortly after the couple had sent out wedding invitations.

Then, on May 27, Wozniacki was upset in the first round of the French Open. It was the earliest exit for Wozniacki, the No. 13 seed, from the tournament since her debut in 2007.

Perhaps in an effort to clear her mind and have some fun, Wozniacki spent the weekend in Miami with her good friend Serena Williams, who also took an early exit in Paris. While the two are fierce competitors on the court, they're also buddies off it, and Williams was one of the first to console Wozniacki after her breakup.

On Friday the pair watched the Heat dismantle the Pacers and move on to the NBA Finals.

Later that night Wozniacki took control of the DJ booth at a Miami club:

The next day Williams and Wozniacki hit the beach:

At the beach they stumbled upon a wedding, and Williams took it upon herself to crash the proceedings:

It's too bad Wozniacki didn't get a photo with the groom and bride, but you can't blame her if she wasn't exactly dying to jump into a wedding party after what happened with her and McIlroy.

(Update: The bride tell TMZ that she is "totally cool with" Serena's cameo.)

(H/T to For The Win)