Phase of the FFT of a sine function
The phase of a sinewave that is not exactly periodic relative to the FFT aperture length is discontinuous at the edges.  If you want a sane/visualizable phase (not the phase of a discontinuity) for non-periodic frequencies, try generating your sinewave with a known phase at the center of the FFT (sin(2*pi*foo*(t-N/2))), and use an fftshift to re-reference the reported phase result of the FFT to the center of the FFT aperture as well.  Then the oddness/evenness ratio of your test function, and thus the phase result will remain stable as frequency is swept between FFT bin center frequencies.

The phase of a non-periodic-in-aperture sinewave will contain the phase of the convolution of the signal with the transform of the FFT window (something like a Sinc, which ends up spanning the full width of the FFT), which will also have a phase related to that of the signal.  Even a computed FFT of an exactly periodic sinewave will also produce some values that aren't exactly zero in all the other bins due to quantization noise in the computer arithmetic; thus those essentially zero, but not quite zero, magnitudes will have a phase that may or may not be zero.  And the phase of an actual zero magnitude vector is indeterminate, not necessarily zero.