Understanding the FFT phase spectrum with a simple example
For sinusoids that are not exactly integer periodic in the FFT length, an FFT measures the phase at a circular discontinuity.  And that discontinuity flips direction as frequency changes from slightly below to slightly above an exact integer periodic-in-aperture frequency.  This is part of the effect of the default rectangular windowing of any finite length DFT or FFT.  Thus making the FFT phase result of a frequency sweep hard to interpret.

The way to remove this measurement at a circular discontinuity is to shift the waveform discontinuity away from the phase measurement point (FFT input sample 0) by doing a (circular) FFTShift before the FFT.  Then your FFT phase result will be referenced to the center of the original input vector (original waveform sample N/2), which will be continuous for continuous input functions or waveforms.  

After the FFT following an fftshift, you can use the FFT frequency and phase results for the the center of the original input waveform to compute the phase at any other point (for instance the beginning, or sample 0 of the original input waveform.  Or the end, etc.).