If your chain is long enough to allow you to shift into the big-big (52x32) combination and your rear derailleur will wrap up enough chain to allow small-small (36x11) then it will work fine with the 12x25 cassette. However, some minor tweaking of the shift cable tension and perhaps of the limit screws may be needed to account for tolerances in the cog spacing between the two cassettes. Typically even if you replace a cassette with an identically configured one some minor adjustments are needed.