You should also install .NET 4 on your testing server. To change from .NET 3.5 to 4.0, first I would upgrade to the latest version of mojoPortal using the .NET 3.5 package of mojoPortal, then after that upgrade just install the .NET 4 package of mojoPortal of the latest version on top of it, then change the application pool to a .NET 4 application pool. Make sure to use the new Web.config (that ships with mojoPortal) each time and restore custom settings like machine key from your old Web.config to the new one.
Hope it helps,
Joe