Since adequate answers to the question asked have been given, I will address the relevant underlying theorems. There are two relevant theeorems, both called ``Whitehead's theorem''. One says that a weak homotopy equivalence between CW complexes is a homotopy equivalence. The other says that an integral homology isomorphism between suitable spaces, say nilpotent but it actually holds a little more generally, is a weak homotopy equivalence; I say weak because that is what comes naturally out of the proof. I observed in "The dual Whitehead theorems'', #47 on my web page, that these two theorems are word for word Eckmann-Hilton dual to each other when thought of in the right homotopical way (this was presented at a birthday conference for Hilton). The idea is that you study $[X,Y]$ by decomposing $X$ using cells to get the first theorem and decompose $Y$ using "cocells'', via (generalized) Postnikov towers, to get the second. This point of view is explained more leisurely in "More concise algebraic topology", by Kate Ponto and myself: it dominates our treatment of localizations and completions of spaces. It is an especially precise application of the intuition of model category theory, but it is best understood when worked out directly, without invoking that language.