Unit tests MDL-24980 Initial fix (no fully working yet) for portfolioaddbutton test