Take the usual Fourier transform of a function $f(t)$:
$$F(s)=\int_{-\infty}^{\infty} f(t) e^{-i2\pi st} dt$$
Naively, I think that $f(t)$ has to be tested "against" all frequencies $s$ and all phases (I mean, it's not only the "right" $s$ that matters, but also the right phase)...but where is the phase information coded? Or am I wrong in my interpretation of the FT?
The question is poorly defined enough that I hesitate to suggest that the following may be an answer:
There's no need to "code" information about phase-shifted complex exponentials separately, because that's contained in the information about the unshifted exponential. If $\phi$ is a real constant then $$\int e^{-i(t+\phi)\xi}f(t)=e^{-i\phi\xi}\int e^{-it\xi}f(t).$$
Edit: As of a comment below, I think I have a better idea what the OP is actually asking. THe problem has been what we mean by "the phase information". Now he ask specifically why/where/how terms like $\cos(n(t-\phi))$ were "discarded" in the transform of $\cos(t)$; evidently the "phase information" is the component of such terms.
Note I'm going to talk about Fourier series (for $2\pi$-periodic functions) instead of the Fourier transform, because the very notion of the Fourier transform of $\cos(t)$ is problematic.
The Fourier series for $\cos(t)$ is indeed $$\cos(t)=\cos(t).$$
Why is the coefficient of $\cos(t-\phi)$ zero? The question itself involves a misconception. Given two functions $f$ and $g$ there's really no such thing as the component of $g$ in $f$; in fact $f$ has coefficients with respect to an orthonormal family of functions. When we're doing Fourier series we talk about expansions in terms of $\cos(nt)$ and $\sin(nt)$, so there simply is no coeffcient of $\cos(t-\phi)$ in the expansion.
So if we wanted to concoct an answer to the question of where $\cos(t-\phi)$ was "discarded" in the expansion of $\cos(t)$, the answer would be that it was discarded when we chose to use $\cos(nt)$ and $\sin(nt)$ for Fourier series. If we used a different orthonormal basis then $\cos(t-\phi)$ might not have been "discarded".
Honest. For example, we could use expansions in terms of the functions $\cos(n(t+2))$ and $\sin(n(t+2))$. Writing $\cos(t)=\cos((t+2)-2)$ shows that $$\cos(t)=\cos(2)\cos(t+2)+\sin(2)\sin(t+2).$$So in this strange version of Fourier series the $\cos(t+2)$ is not "discarded"; the coefficient of $\cos(t+2)$ is $\cos(2)$.
To put it all another way: The notion of "With phase shifts or without phase shifts" is not intrinsic to a function, it applies to how we choose to represent a function. The function $\cos(t)$ is a sum of phase-shifted sines and cosines.