As soon as you enter the Test Chamber, place a portal on the wall directly to your left and then look across the water and fire your second one on the left-hand wall.
Walk through the portals, hit the red button to drop the Companion Cube down and then head back through the first portal and you’ll be right back at the start again.
From here, replace the portal that was near the Cube to where the laser beam is hitting the wall. This will direct the laser onto the beam receiver powering up the moving platform behind you.
Immediately turn around and wait for the platform to be in the middle of the room before firing the portal that was redirecting the laser beam elsewhere (to turn the power off).
Once again place the second portal over by the Companion Cube and walk through towards it. Pick it up and jump across towards the platform. Set down the Companion Cube and then repower up the laser with a new portal.
Immediately pick up the Companion Cube and turn around, this allows you to block the laser beam as you approach it, stopping the platform (so make sure you're standing near the left end of the platform).
Run towards the right-hand end of the platform and then recollect the Cube, walk off, place it on the red button and the exit will open!