Issue #2575267 by webflo, kgoel, voleger, MerryHamster, hussainweb, Mile23: Add test coverage for rebuild.php