My theory:
Portal was an experimental game for Valve to see if they can make a cool puzzle game. They re-used Half-Life 2’s engine, and many elements, such as sounds, some elements for the turrets, the energy orb, etc. since they already had all that.
Then, for fun, they figured it would be cool to have some indications about Black Mesa in Portal and link the two universes together.
Then came the idea of the Borealis, and that Portal takes place on that ship, but no reference has been made to this in the games. In EP2, all we know is that there is the Borealis and it has to be destroyed. They have teleportation technology, and that’s it.
I doubt they would eventually link Portal and Half-Life together. They’re about different things, it would not work. Portal is a puzzle game, and Half-Life is a FPS. The link can be present for fun and for easter eggs, but I don’t think they would really let you have the portal gun in EP3, or anything like that.
Portal 2 has been announced, and there was no indication of it being related to EP3 in any way from the teasers.