Confused

I took a pregnancy test yesterday and I had a faint line ( thought it was positive) but when I went to the doctor today she told me the test she did was negative... Has this happened to someone before?