EDIT: Damn, this belongs into the Spoiler-section!
EDIT 2: Ok, it's in the spoiler section, no more tags needed. ;P
Uh what?
Since when did Yen Sid already knew they were strong enough? The contrary is true as he clearly said in the beginning. They were self-taught and Yen Sid admired that as a remarkable feat, but this would not be enough against a threat like Master Xehanort.
Sora and Riku also gained something very important from the dream world. Have you not seen the ending when Riku dived into Sora's heart to save him?
That is the new power both Sora and Riku attained by unlocking seven Keyholes of sleep. By doing this, you gain the power to 1st) enter the realm of sleep willingly (as Sora did in the end when he dives through the credits) and 2nd) most importantly they gained the power to reawaken sleeping hearts that are connected to them. Which is in essence a power to revive someone as long as their heart can be found and it is connected to either Sora or Riku.
Combine that with the data of Ansem the Wise which holds the details on how lost hearts can be connected and you have the powerful tool at hand which Sora and Riku can use to bring back Naminé, Xion, Roxas, Aqua, Terra and Ventus, as was foreshadowed in Blank Points, the secret ending of Birth by Sleep.
Going by that, I would actually say Sora and Riku gained something huge from going through the realm os sleep (not to mention they learned to properly use the Keyblade and revived six friggin' whole worlds!)