Just go over and press the small red button, then make a portal on the wall across the way and a portal on the wall nearby. Go through and use the exit door.
Wheatley thinks it will be easier if he just makes you do the same test over and over, so he opens a path back to the test that you just solved. Solve it again. This time it doesn't satisfy his craving for testing, so just go through the exit doors and go into the elevator.
Now you'll end up in one of GLaDOS's test chambers, which Wheatley is claiming is his own (because he added the word TEST to the wall.)
There is an excursion funnel flowing toward the ceiling on the right. Get into the funnel and look up. Put a portal on the ceiling where the funnel is flowing toward.
After you go through the black ring in the translucent ceiling, go to the side to get out of the funnel.
Up on a ledge, there is a frankencube. Look across from that ledge to see a white wall across from it. Put a portal on it such that the excursion funnel goes through the portal that you put in the ceiling above it and comes out of the white wall across from the frankenturret's ledge. Get into the funnel, then step out of it when you are over the frankenturret's ledge.
Pick up the frankenturret and go down to where the funnel is coming through the hole in the floor. Look down through that hole to see an area of the floor with a checkerboard pattern on it. Put a portal on that spot, then put another portal on the ceiling where the funnel is flowing. Put the frankenturret into the funnel. It will go through the funnel, through the portals, and onto the red button on the ceiling in the area below, unlocking the exit door. Go through and get into the elevator.